Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8201
Location: Dubuque, Iowa, USA

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: 10375
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: 182
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: 10375
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 Looping REXX - unable to interrupt RAVISANKAR07 CLIST & REXX 3 Wed Dec 06, 2017 1:08 pm
No new posts The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
This topic is locked: you cannot edit posts or make replies. Rexx to Grab ISMF Information. upendrasri All Other Mainframe Topics 16 Sun Nov 26, 2017 12:35 am
No new posts Rexx to send an email without SMTP Se... upendrasri All Other Mainframe Topics 12 Sun Nov 19, 2017 7:59 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us