IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Retreiving MAXCC of a Job through REXX


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prasadchikane

New User


Joined: 18 Feb 2014
Posts: 9
Location: India

PostPosted: Tue Feb 18, 2014 4:15 pm
Reply with 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.

Please provide me some pointers on this.
Back to top
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Tue Feb 18, 2014 4:26 pm
Reply with quote

You can try SDSF REXX to achieve your requirement.

Are you using any Job Scheduling toold to submit your jobs?
Back to top
View user's profile Send private message
prasadchikane

New User


Joined: 18 Feb 2014
Posts: 9
Location: India

PostPosted: Tue Feb 18, 2014 4:27 pm
Reply with quote

No. I am not using any Job Schedulling Tool.
Back to top
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Tue Feb 18, 2014 5:32 pm
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Feb 18, 2014 7:16 pm
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Feb 18, 2014 8:46 pm
Reply with quote

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 icon_eek.gif

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

New User


Joined: 18 Feb 2014
Posts: 9
Location: India

PostPosted: Wed Feb 19, 2014 11:00 am
Reply with quote

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

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Wed Feb 19, 2014 11:09 am
Reply with quote

Where will your jobs reside? in SDSF or a Job Archival and Retrieval system(like CA VIEW/SAR) ?
Back to top
View user's profile Send private message
prasadchikane

New User


Joined: 18 Feb 2014
Posts: 9
Location: India

PostPosted: Wed Feb 19, 2014 11:11 am
Reply with quote

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

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Wed Feb 19, 2014 11:19 am
Reply with quote

I guess you will find a sample job in the link I posted earlier in this thread.
Back to top
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 199
Location: UK

PostPosted: Wed Feb 19, 2014 2:02 pm
Reply with quote

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

New User


Joined: 18 Feb 2014
Posts: 9
Location: India

PostPosted: Wed Feb 19, 2014 3:00 pm
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Feb 19, 2014 3:03 pm
Reply with quote

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

New User


Joined: 18 Feb 2014
Posts: 9
Location: India

PostPosted: Thu Feb 20, 2014 11:54 am
Reply with quote

Thanks a lot all of you for your help and inputs.
I found a very helpful presentation at IBM Education Assistant



I was able to learn more than what I needed.

Thanks once again for your help too.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Feb 20, 2014 9:02 pm
Reply with quote

Hello,

Thanks for the link to the Education Assistant.

Others will be able to use this as well icon_smile.gif


d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top