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 for multiple jobs

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

New User


Joined: 26 May 2008
Posts: 7
Location: Trivandrum

PostPosted: Wed Oct 28, 2009 10:54 pm    Post subject: check return code for multiple jobs
Reply with quote

Hi

I have a set of jobs monitored as part of health check. how can this be automated?
Can I have all the job return code in single dataset so that i can email it check?
Or is there a better way for this?
icon_rolleyes.gif
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 Oct 28, 2009 11:05 pm    Post subject: Re: check return code for multiple jobs
Reply with quote

anilscomputer wrote:
I have a set of jobs monitored as part of health check. how can this be automated?


It could be done by employing the use of your site's scheduling system software, which exists pretty much to do just what you want. Or, you could take advantage of your site's other automation tools, depending on what they are and how available they are.

anilscomputer wrote:
Can I have all the job return code in single dataset so that i can email it check?


Yes, there are many topics you can search for that deal with procedures to track and log the batch job control blocks, which you could of course accumulate and process as you wish. There are also many topics that deal with using your spool interface tools (SDSF, IOF, Sysview, to name a few) to provide these types of details.
Back to top
View user's profile Send private message
anilscomputer

New User


Joined: 26 May 2008
Posts: 7
Location: Trivandrum

PostPosted: Thu Oct 29, 2009 12:22 pm    Post subject: Reply to: check return code for multiple jobs
Reply with quote

Thanks for the reply. As you said SDSF is an option currently used to check the status of jobs manually.
Please correct if am wrong?
1:System has a log for all the recent job log informations that has run, may be in a particular day. So searching this log or sorting this will help to identify the returncodes for the jobs. ( if so how can i get the log name?)
2: Writing a REXX code. ( Is there any piece of code so that i can amend to my need in getting the return code for multiple jobs)
3: Writing the maxx return code for each job in a dataset ? ( Dont know if this is feasible)

Is there any better option ? icon_rolleyes.gif
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: Thu Oct 29, 2009 8:17 pm    Post subject:
Reply with quote

Hello,

Before you try to develop anything, you need to talk with the scheduling people and learn what is already available.

One place to get this info is the SMF data. REXX, SAS, or something else might be used. . .
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Oct 29, 2009 8:20 pm    Post subject:
Reply with quote

Also, if you explain the reason behind the request we may have other options available.
Back to top
View user's profile Send private message
anilscomputer

New User


Joined: 26 May 2008
Posts: 7
Location: Trivandrum

PostPosted: Thu Oct 29, 2009 9:02 pm    Post subject: Reply to: check return code for multiple jobs
Reply with quote

Thank you Dick
I have checked this with the scheduling Guys and could find that they use UC4 scheduler (recently migrated from CA7) and they dont have such facility developed currently.

Hi Expat
The requiement :
I have 15 jobs to be checked daily morning to ensure that they run fine yesterday. Currently i do this by SDSF manually visiting the return code for all jobs. So I need to know if there is any way to get these jobs status automatically. Hope this clarifies the requirement. icon_rolleyes.gif icon_rolleyes.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Oct 29, 2009 9:06 pm    Post subject:
Reply with quote

Here's a piece of REXX code published earlier on this forum by superk which gives the return codes of all step in a job. It can be easily adapted to write to a dataset.
Code:

/* REXX *** GETRC *** GET THE STEP NAME AND RETURN CODE              *
NUMERIC DIGITS(32)                                                   
TCB=STORAGE(D2X(540),4)                                               
JSCB =STORAGE(D2X(C2D(TCB)+180),4)                                   
JCT = STORAGE(D2X(C2D(JSCB)+261),3)                                   
THIS_STEP_NO = X2D(C2X(STORAGE(D2X(C2D(JSCB)+228),1)))               
FSCT = STORAGE(D2X(C2D(JCT)+48),3)                                   
TEMP_SCT = FSCT                                                       
DO I = 1 TO (THIS_STEP_NO - 1)                                       
  STEP = STORAGE(D2X(C2D(TEMP_SCT)+68),8)                             
  RCSTEP = X2D(C2X(STORAGE(D2X(C2D(TEMP_SCT)+24),2)))                 
  BYPASS = STORAGE(D2X(C2D(TEMP_SCT)+188),1)                         
  IF X2D(C2X(BYPASS)) = 80                                           
    THEN RCSTEP = 'FLUSHED '                                         
  SAY 'STEP ==>' STEP ' RC ==>' RCSTEP                               
  TEMP_SCT = STORAGE(D2X(C2D(TEMP_SCT)+36),3)                         
END                                                                   
EXIT                                                                 
Back to top
View user's profile Send private message
anilscomputer

New User


Joined: 26 May 2008
Posts: 7
Location: Trivandrum

PostPosted: Thu Oct 29, 2009 9:17 pm    Post subject:
Reply with quote

Hi Expat
Sorry I could not make you clear about the requirement.

It is to get the return code of the 15 JOBs. Basically to know if any of these jobs has failed.

I am currently searching in REXX to know if this was posted earlier.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Oct 29, 2009 9:22 pm    Post subject:
Reply with quote

The above code needs to be put into an IKJEFT01 step as the last step of each job.

The code needs to be amended to write the output to a dataset, and all you need to do is to look at the datasets in the morning and see what happened over night.
Back to top
View user's profile Send private message
anilscomputer

New User


Joined: 26 May 2008
Posts: 7
Location: Trivandrum

PostPosted: Thu Oct 29, 2009 9:35 pm    Post subject:
Reply with quote

Thank You Expat for your valuable suggession.

Other than making changes in the existing production jobs is there any alternatives? I only need to know the job status for all jobs
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: Thu Oct 29, 2009 10:37 pm    Post subject: Re: Reply to: check return code for multiple jobs
Reply with quote

anilscomputer wrote:
Currently i do this by SDSF manually visiting the return code for all jobs.


Again, as I already stated earlier, why couldn't you automate this process by writing a job (using the batch SDSF interface) or REXX exec (using the REXX interface) or both to do this for you?
Back to top
View user's profile Send private message
anilscomputer

New User


Joined: 26 May 2008
Posts: 7
Location: Trivandrum

PostPosted: Thu Oct 29, 2009 10:42 pm    Post subject:
Reply with quote

Thank You all for your valuable time.

I got some piece of REXX code from the forum and am into it.
icon_razz.gif
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: Thu Oct 29, 2009 11:29 pm    Post subject:
Reply with quote

Hello,

Good luck - someone will be here if there are questions/problems icon_smile.gif
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 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
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am


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