View previous topic :: View next topic
|
Author |
Message |
prasadchikane
New User
Joined: 18 Feb 2014 Posts: 9 Location: India
|
|
|
|
I have a requirement in which I want to read the MAXCC with which the JOB ends.
I am trying to write a routine in REXX which will take the JOBNAME (which is submitted) as input and return the MAXCC of that Job.
Please provide me some pointers on this. |
|
Back to top |
|
|
TheMFKid
New User
Joined: 20 Nov 2013 Posts: 91 Location: India
|
|
|
|
You can try SDSF REXX to achieve your requirement.
Are you using any Job Scheduling toold to submit your jobs? |
|
Back to top |
|
|
prasadchikane
New User
Joined: 18 Feb 2014 Posts: 9 Location: India
|
|
|
|
No. I am not using any Job Schedulling Tool. |
|
Back to top |
|
|
TheMFKid
New User
Joined: 20 Nov 2013 Posts: 91 Location: India
|
|
|
|
I think the best way might be a REXX code using SDSF REXX.
I guess this topic has been discussed quite a few times in this forum.
ibmmainframes.com/about45340.html
You will get sample code from above link. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Terminology is critical in IT where similar terms may mean very different things. "MAXCC" is a term that is used ONLY with IDCAMS -- your use of it in referring to JCL is completely and totally WRONG. You are wanting the job return code or condition code, because unless your job has a step executing IDCAMS, referring to MAXCC is incorrect. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
I have a requirement in which I want to read the MAXCC with which the JOB ends.
I am trying to write a routine in REXX which will take the JOBNAME (which is submitted) as input and return the MAXCC of that Job.
|
if You want to do it as the last step of the job it is quite simple
( a few examples on the forums )
doing from the outside, brrrr You are looking for trouble
also remember that the job You have just submitted might sit in the system for a long time
before being selected for execution.
plese do not tell that You are trying to write Your own scheduler
in this case the topic should be locked and later on vaporized
because it belong to the INfamous category of the topics not eligible for discussion |
|
Back to top |
|
|
prasadchikane
New User
Joined: 18 Feb 2014 Posts: 9 Location: India
|
|
|
|
@Robert.: Sorry for using a wrong term as MAXCC. Will keep that in mind.
I am not writing a scheduller. I have got some specific jobnames for which I just have to get a report of the JOB RETURN CODE. I am planning to write those to a PS file. Thats it. Please do not relate this to a Job Scheduller.
I cannot put it as a last step in the job. I cannot edit the jobs available. |
|
Back to top |
|
|
TheMFKid
New User
Joined: 20 Nov 2013 Posts: 91 Location: India
|
|
|
|
Where will your jobs reside? in SDSF or a Job Archival and Retrieval system(like CA VIEW/SAR) ? |
|
Back to top |
|
|
prasadchikane
New User
Joined: 18 Feb 2014 Posts: 9 Location: India
|
|
|
|
The jobs will reside in SDSF. I am going through the IBM document on REXX and SDSF commands. Trying to figure out a solution. |
|
Back to top |
|
|
TheMFKid
New User
Joined: 20 Nov 2013 Posts: 91 Location: India
|
|
|
|
I guess you will find a sample job in the link I posted earlier in this thread. |
|
Back to top |
|
|
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
Reading the SMF records might be the best approach. Can you be sure that the jobs will still be available in SDSF when your report runs? |
|
Back to top |
|
|
prasadchikane
New User
Joined: 18 Feb 2014 Posts: 9 Location: India
|
|
|
|
Yes. I am sure that the jobs will be available in SDSF when my report generation routine runs. I have reached at a point where I am able to read the entire spool.
Now trying to add filters for the desired job in spool |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
search the forums using SDSF REXX and enrico* as author
You will find tested snippets
and jobs are not stored/reside in SDSF... they are stored/reside in the SPOOL
and SDSF is a program/tool/whatever used to handle the JOBS in the SPOOL managed by JES2 |
|
Back to top |
|
|
prasadchikane
New User
Joined: 18 Feb 2014 Posts: 9 Location: India
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Thanks for the link to the Education Assistant.
Others will be able to use this as well
d |
|
Back to top |
|
|
|