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
 

 

RC of a JOB in temporary dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
isnehil
Warnings : 1

New User


Joined: 10 Oct 2007
Posts: 23
Location: mumbai

PostPosted: Thu May 22, 2008 12:37 pm    Post subject: RC of a JOB in temporary dataset
Reply with quote

Hi all,

I want the Return code of a particular jobname & jobid pulled through the REXX program to be written into the dataset TEMPPRT.

Here is my code which is working fine, if I want to extract information job info such as SASLOG, JESMSG, etc.

How do I modify it so that I can extract the Return code inforamtion when a JOBNAME & JOBID is supplied. I am trying, but not yet able to figure out.

Please help..

Thanks in advance,

~ Snehil

Here is the code:
Code:

/* REXX */                                                              00010000
SAY PLEASE ENTER JOBNAME JOBID                                          00020000
PULL JOBNAME JOBID                                                      00030000
/*SAY PLEASE ENTER XDC DSN                                              00040001
PULL XDCDS                                                              00050002
SAY PLEASE ENTER STRING                                                 00051000
PULL STRNG */                                                           00052002
D="'"                                                                   00060000
XDCNAME=D||XDCDS||D                                                     00070000
                                                                        00080000
/*SAY YOU ENTERED JOBNAME JOBID */                                      00090003
JOBIDD="JOBID"                                                          00100000
ADDRESS TSO                                                             00110000
"DELETE 'PWSX.KAMSHEW.TP.SDSF'"                                         00120000
"DELETE 'PWSX.KAMSHEW.SPMON'"                                           00121004
"ALLOC F(ISFIN) TRACKS SPACE(1) REU"            /* USED BY SDSF     */  00130000
                                                                        00140000
"ALLOC F(ISFOUT) DA('PWSX.KAMSHEW.TP.SDSF') NEW DELETE REU ",           00150000
"TRACKS SPACE(100,100) LRECL(133) RECFM(F,B,A) DSORG(PS)"               00160000
                                                                        00170004
"ALLOC F(TEMPPRT) DA('PWSX.KAMSHEW.SPMON') NEW DELETE REU ",            00180004
"TRACKS SPACE(100,100) LRECL(133) RECFM(F,B,A) DSORG(PS)"               00190004
                                                                        00200004
                                                                        00201003
QUEUE "SET CONFIRM OFF"                                                 00210000
QUEUE "OWNER *"                                                         00220000
QUEUE "PREFIX *"                                                        00230000
QUEUE "DA"                                                              00240000
QUEUE "ST"                                                              00250000
QUEUE "SELECT "JOBNAME JOBID                                            00260002
QUEUE "AFD REFRESH"                                                     00270004
QUEUE "FIND "JOBNAME                                                    00280000
QUEUE "++?"                                                             00290004
QUEUE "FIND SASLOG"                                                     00300004
QUEUE "++S"                               /* BROWSE MSGUSR DATASET */   00310004
QUEUE "L MAX-RC"                                                        00311004
QUEUE "PRINT FILE TEMPPRT "            /* PRINT TO TEMP DATASET */      00320004
QUEUE "PRINT 1 999999"                                                  00330000
QUEUE "PRINT CLOSE"                                                     00340000
QUEUE "END"                                                             00350000
QUEUE "EXIT"                                                            00360000
                                                                        00370000
"EXECIO" QUEUED()" DISKW ISFIN (FINIS"     /* INPUT TO SDSF BATCH   */  00380000
                                                                        00390000
ADDRESS ISPEXEC "SELECT PGM(ISFAFD) PARM('++32,255')" /* INVOKE SDSF */ 00400000
EXIT                                                                    00410000
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu May 22, 2008 1:30 pm    Post subject:
Reply with quote

Too cumbersome. I would travel though TCB --> JSCB --> JCT --> SCT control blocks to get the RC. Your desired field is SCTSEXEC.

O.
Back to top
View user's profile Send private message
isnehil
Warnings : 1

New User


Joined: 10 Oct 2007
Posts: 23
Location: mumbai

PostPosted: Thu May 22, 2008 1:40 pm    Post subject:
Reply with quote

Hi... thanx for your reply....

Though I am not familiar with the system control blocks yet I have found a thread...
http://www.ibmmainframes.com/about3904.html

Thanx a ton for showing me the right way...
I shall try to execute using the TCB --> JSCB --> JCT --> SCT control blocks to get the RC.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2033
Location: Silicon Valley

PostPosted: Thu May 22, 2008 10:02 pm    Post subject: Reply to: RC of a JOB in temporary dataset
Reply with quote

Quote:

Too cumbersome. I would travel though TCB --> JSCB --> JCT --> SCT control blocks to get the RC. Your desired field is SCTSEXEC.


Searching through control blocks only tells you stuff about your own address space.

I understood the question to be about finding the return codes from a completed batch job.
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 May 22, 2008 11:43 pm    Post subject:
Reply with quote

Hello,

Quote:
How do I modify it so that I can extract the Return code inforamtion when a JOBNAME & JOBID is supplied.


In the JESYSMSG sysout dataset, there will be a line similar to this for each step:
Code:
IEF142I ZQZDSGNR GENR - STEP WAS EXECUTED - COND CODE 0000
I believe this is what you want.
Back to top
View user's profile Send private message
isnehil
Warnings : 1

New User


Joined: 10 Oct 2007
Posts: 23
Location: mumbai

PostPosted: Tue Jun 10, 2008 3:06 pm    Post subject:
Reply with quote

Thanks Dick & Pedro...
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: Tue Jun 10, 2008 8:16 pm    Post subject: Reply to: RC of a JOB in temporary dataset
Reply with quote

You're welcome icon_smile.gif

Is your process now working?

d
Back to top
View user's profile Send private message
isnehil
Warnings : 1

New User


Joined: 10 Oct 2007
Posts: 23
Location: mumbai

PostPosted: Mon Jun 16, 2008 1:58 pm    Post subject:
Reply with quote

Yes,I have worked out the solution for my requirement ..... thanks for all your support... have a nice time...
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: Mon Jun 16, 2008 7:22 pm    Post subject: Reply to: RC of a JOB in temporary dataset
Reply with quote

Good to hear it is working icon_smile.gif

If you post your solution, it may help someone with a similar question later.

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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts JCL to get submitted once dataset has... vinu78 JCL & VSAM 17 Thu Feb 16, 2017 7:32 am
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm


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