Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Find Return code of previous step with REXX

2 views
Skip to first unread message

Jay Pillai

unread,
Jan 18, 2005, 6:46:03 AM1/18/05
to
Is it possible to find the return code of a step in JCL with REXX

Example: JCL with 2 steps
STEP1 Does some processing... and gives a return code
STEP2 REXX step, to trap this Return code and pass it
as a variable to another program.

Any hints, how to do this.

Thank you

Jay


This e-mail, including attachments, is intended for the person(s) or
company named and may contain confidential and/or legally privileged
information. Unauthorized disclosure, copying or use of this information
may be unlawful and is prohibited. If you are not the intended recipient,
please delete this message and notify the sender

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX

Hamilton, Robert L

unread,
Jan 18, 2005, 7:09:42 AM1/18/05
to
Do a google for STORAGE function and REXX

Check also on MVSHELP.COM

bobh

OneHandClapping

unread,
Jan 18, 2005, 8:37:01 AM1/18/05
to
the step condition entries are anchored in the system step condition
table (the sct), and each step will have its return code in SCTSEXEC.
rexx can access this information using the storage function.


snip:

, SCT = STORAGE(D2X(DJCT+48),3)
, do until sct="000000"x
, DSCT = C2D(SCT)+16
, sct=parsedumper(storage(d2x(dsct),176)
, end
, exit 0
,parsedumper:
, procedure expose dsct
, parse arg sctdata
, parse value sctdata with 1 SCTDISKA ,
, +3 SCTTBLID ,
, +1 SCTSSTAT ,
, +1 SCTRSVD1 ,
, +3 SCTSEXEC ,

STEPNAME PROCSTEP RC
RC4 04
RC8 08
RC12 12
RC16 16
RC32 32
RC64 64

sct at 8DF1B8
SCTSEXEC 0004
sct at 8DF278
SCTSEXEC 0008
sct at 8DFC38
SCTSEXEC 000C
sct at 8DFE78
SCTSEXEC 0010
sct at 8D20E8
SCTSEXEC 0020
sct at 8D2328
SCTSEXEC 0040

Jay Pillai

unread,
Jan 19, 2005, 7:25:34 AM1/19/05
to
I did a search in Google, but I did not found anything which can give me a
Job step return code.
Is there any other way to do this?.

Jay


"Hamilton, Robert
L"
<roberth@UTDALLAS
.EDU>

Sent by: TSO REXX To: TSO-...@VM.MARIST.EDU
Discussion List cc: (bcc: Jay Pillai/SwissRe)
<TSO-...@VM.MARI bcc: Jay Pillai/SwissRe
ST.EDU> Subject: Re: Find Return code of previous step with REXX


18.01.2005 13:09
Please respond to
TSO REXX
Discussion List

Hamilton, Robert L

unread,
Jan 19, 2005, 7:50:23 AM1/19/05
to
You need to get on www.mvshelp.com <http://www.mvshelp.com/> GET A USER
ID; IT'S FREE

/* rexx THIS IS ONE OF MANY EXAMPLES OF GETTING STEP RETURN CODES. .
.*/

/* MANY OTHER EXAMPLES ARE GIVEN IN IBM 'DATA AREA ' MANUALS */


NUMERIC DIGITS(32) /* ENSURE MAX PRECISION */

TCB=STORAGE(D2X(540),4) /* PSATOLD IN PSA */

JSCB =STORAGE(D2X(C2D(TCB)+180),4) /* TCBJSCB IN TCB */

JCT = STORAGE(D2X(C2D(JSCB)+261),3) /* JSCBJCTA IN JSCB */

THIS_STEP_NO = X2D(C2X(STORAGE(D2X(C2D(JSCB)+228),1)))

/* THIS STEP NO. */

FSCT = STORAGE(D2X(C2D(JCT)+48),3) /* JCTSDKAD IN JCT */

/* IS FIRST SCT */

TEMP_SCT = FSCT

DO I = 1 TO (THIS_STEP_NO - 1)

STEP = STORAGE(D2X(C2D(TEMP_SCT)+68),8)

RCSTEP = X2D(C2X(STORAGE(D2X(C2D(TEMP_SCT)+24),2)))

/* SCTSEXEC IN SCT */

BYPASS = STORAGE(D2X(C2D(TEMP_SCT)+188),1)

IF X2D(C2X(BYPASS)) = 80 THEN /* CHECK IF STEP WAS*/

/* NOT EXECUTED */

RCSTEP = 'FLUSHED '

SAY 'STEP ==>' STEP ' RC ==>' RCSTEP

TEMP_SCT = STORAGE(D2X(C2D(TEMP_SCT)+36),3)

END

EXIT

Jay Pillai

unread,
Jan 19, 2005, 10:06:56 AM1/19/05
to
Thank you very much for your help, just what I was looking for.

Jay

"Hamilton, Robert
L"
<roberth@UTDALLAS
.EDU>

Sent by: TSO REXX To: TSO-...@VM.MARIST.EDU
Discussion List cc: (bcc: Jay Pillai/SwissRe)
<TSO-...@VM.MARI bcc: Jay Pillai/SwissRe
ST.EDU> Subject: Re: Find Return code of previous step with REXX


19.01.2005 13:49

0 new messages