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
 

 

Retreiving MAXCC of a Job through REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Retreiving MAXCC of a Job through REXX
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    Post subject:
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    Post subject:
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    Post subject:
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.

http://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: 7910
Location: Bellevue, IA

PostPosted: Tue Feb 18, 2014 7:16 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Feb 18, 2014 8:46 pm    Post subject: Reply to: Retreiving MAXCC of a Job through REXX
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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: 175
Location: UK

PostPosted: Wed Feb 19, 2014 2:02 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Feb 19, 2014 3:03 pm    Post subject: Reply to: Retreiving MAXCC of a Job through REXX
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    Post subject:
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

Site Director


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

PostPosted: Thu Feb 20, 2014 9:02 pm    Post subject:
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    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 What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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