View previous topic :: View next topic
|
Author |
Message |
anilscomputer
New User
Joined: 26 May 2008 Posts: 7 Location: Trivandrum
|
|
|
|
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?
|
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
anilscomputer
New User
Joined: 26 May 2008 Posts: 7 Location: Trivandrum
|
|
|
|
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 ? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Also, if you explain the reason behind the request we may have other options available. |
|
Back to top |
|
|
anilscomputer
New User
Joined: 26 May 2008 Posts: 7 Location: Trivandrum
|
|
|
|
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. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
anilscomputer
New User
Joined: 26 May 2008 Posts: 7 Location: Trivandrum
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
anilscomputer
New User
Joined: 26 May 2008 Posts: 7 Location: Trivandrum
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
anilscomputer
New User
Joined: 26 May 2008 Posts: 7 Location: Trivandrum
|
|
|
|
Thank You all for your valuable time.
I got some piece of REXX code from the forum and am into it.
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Good luck - someone will be here if there are questions/problems |
|
Back to top |
|
|
|