View previous topic :: View next topic
|
Author |
Message |
isnehil Warnings : 1 New User
Joined: 10 Oct 2007 Posts: 23 Location: mumbai
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
isnehil Warnings : 1 New User
Joined: 10 Oct 2007 Posts: 23 Location: mumbai
|
|
|
|
Hi... thanx for your reply....
Though I am not familiar with the system control blocks yet I have found a thread...
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
isnehil Warnings : 1 New User
Joined: 10 Oct 2007 Posts: 23 Location: mumbai
|
|
|
|
Thanks Dick & Pedro... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome
Is your process now working?
d |
|
Back to top |
|
|
isnehil Warnings : 1 New User
Joined: 10 Oct 2007 Posts: 23 Location: mumbai
|
|
|
|
Yes,I have worked out the solution for my requirement ..... thanks for all your support... have a nice time... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Good to hear it is working
If you post your solution, it may help someone with a similar question later.
d |
|
Back to top |
|
|
|