|
|
| Author |
Message |
sandabis
New User
Joined: 03 Jun 2007 Posts: 7 Location: India
|
|
|
|
Hi All
I have a requirement where i have to check the RC of each job step and write it in a dataset. It should be done at execution time of the job. (last step of the job). I am aware of a REXX code which uses control variable to get the RC. But that does not work when the job abends. Also I cannot use SDSF pgm as it is not feasible to see production spool.
Can anybody help in this regard
Regards
Sandabis |
|
| Back to top |
|
 |
References
|
Posted: Mon May 05, 2008 1:02 am Post subject: Re: Check Return Code of each jobstep |
 |
|
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 6726 Location: 221 B Baker St
|
|
|
|
Hello Sandabis and welcome to the forums,
| Quote: |
| I have a requirement where i have to check the RC of each job step and write it in a dataset. |
If you capture this to a dataset, how will that dataset be used?
| Quote: |
| But that does not work when the job abends |
Why is this an issue? An abend is not an RC. . .
| Quote: |
| Can anybody help in this regard |
If you explain what you actually want to accomplish (not to trap the rc's to a file, but how that might be used) someone may have suggestions.
Keep in mind that what you want probably already exists in the scheduling system for your application. |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 2291 Location: italy
|
|
|
|
the SMF data contains that info...
the SMF datasets are used for accounting purposes ( among other things )
and they contain the info You are required to process |
|
| Back to top |
|
 |
sandabis
New User
Joined: 03 Jun 2007 Posts: 7 Location: India
|
|
|
|
Hi and thanks to both of you for the replies.
dick scherrer - My job is to get the stepname where the job abends. I want to pass this stepname as a param to another rexx program and rexx program will send an email to someone telling about the details where abend took place. Please suggest how we can acieve this.
enrico-sorichetti - I have no idea of SMF data. Probably i will google it and try to find out. Can you shred some light about how to use SMF data in a jcl [ref doc or any]. ? |
|
| Back to top |
|
 |
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 853 Location: Virginia, USA
|
|
|
|
| This the sort of thing that SCHEDULING PACKAGES usually handle. |
|
| Back to top |
|
 |
Anuj D.
Senior Member
Joined: 22 Apr 2006 Posts: 1252 Location: Mumbai, India
|
|
|
|
Hi,
| Quote: |
| I am aware of a REXX code which uses control variable to get the RC. But that does not work when the job abends. |
If this can be done at your end, code one more step in your JOB with COND=ONLY and this step should "call" the same REXX in batch. |
|
| Back to top |
|
 |
sandabis
New User
Joined: 03 Jun 2007 Posts: 7 Location: India
|
|
|
|
Hi Anuj
I am already doing that. But RC for that abend step is coming as zero.
The rexx program is using the storage control variables to retrieve the RC.
I am not sure how to retrieve abend RC from sorage. |
|
| Back to top |
|
 |
gcicchet
Active User
Joined: 28 Jul 2006 Posts: 295
|
|
|
|
Hi,
another way to achieve this is to test after each step ie, if the step fails with a rc or abend then run the REXX step, you can pass the STEPNAME to the REXX as an ARG.
As Crag mentioned, scheduling tools are ideal for this type of request.
Gerry |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 6726 Location: 221 B Baker St
|
|
|
|
Hello,
| Quote: |
| program will send an email to someone telling about the details where abend took place |
When this person receives the e-mail, they will have to log on to do anything. If you identify the job name (and jes number), they should be able to work from that info once they log on. Placing the step name and the rc/abend code is actually more than is needed in the e-mail (IMHO).
As has been suggested the scheduling software is a very good way to deal with this. |
|
| Back to top |
|
 |
sandabis
New User
Joined: 03 Jun 2007 Posts: 7 Location: India
|
|
| Back to top |
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3001 Location: Charlotte,NC USA
|
|
|
|
| Cool! Neat code. Thanks for finding it and posting it. |
|
| Back to top |
|
 |
|
|