Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Check Return Code of each jobstep

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sandabis

New User


Joined: 03 Jun 2007
Posts: 7
Location: India

PostPosted: Mon May 05, 2008 1:02 am    Post subject: Check Return Code of each jobstep
Reply with quote

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
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon May 05, 2008 1:56 am    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Mon May 05, 2008 3:02 am    Post subject: Reply to: Check Return Code of each jobstep
Reply with quote

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
View user's profile Send private message
sandabis

New User


Joined: 03 Jun 2007
Posts: 7
Location: India

PostPosted: Mon May 05, 2008 6:54 am    Post subject: Reply to: Check Return Code of each jobstep
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon May 05, 2008 6:58 am    Post subject:
Reply with quote

This the sort of thing that SCHEDULING PACKAGES usually handle.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon May 05, 2008 7:49 am    Post subject:
Reply with quote

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
View user's profile Send private message
sandabis

New User


Joined: 03 Jun 2007
Posts: 7
Location: India

PostPosted: Mon May 05, 2008 7:58 am    Post subject: Reply to: Check Return Code of each jobstep
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Mon May 05, 2008 8:03 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon May 05, 2008 8:17 am    Post subject:
Reply with quote

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
View user's profile Send private message
sandabis

New User


Joined: 03 Jun 2007
Posts: 7
Location: India

PostPosted: Tue May 06, 2008 9:59 pm    Post subject: Reply to: Check Return Code of each jobstep
Reply with quote

Hi all anbd thanks for all suggestions.
Have got what i wanted. Please check the url below.

http://www.mail-archive.com/ibm-main@bama.ua.edu/msg05588.html
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed May 07, 2008 1:56 am    Post subject: Reply to: Check Return Code of each jobstep
Reply with quote

Cool! Neat code. Thanks for finding it and posting it.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts MAX-RC 88 and Return code 606 in DFH0... lind sh CICS 1 Tue Jan 24, 2017 1:23 pm
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us