View previous topic :: View next topic |
Author |
Message |
asr2 Beginner
Joined: 25 Jun 2011 Posts: 26 Topics: 4 Location: Germany
|
Posted: Fri Jul 08, 2011 12:00 am Post subject: Where can I find the step completion codes for current job |
|
|
Hi
In an application I need to determine the step completion codes. Currently I parse the SDSF output, a solution thast has a number of drawbacks, including, obviously, the requirement that SDSF is available. A better solution would be to get this information directly from the system control blocks. The SCT does not seem to contain this info. Does anyone have some ideas? |
|
Back to top |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Fri Jul 08, 2011 2:28 am Post subject: |
|
|
Look at this solution from the web
Code: |
/* REXX */
/* GET THE STEP NAME AND RETURN CODE */
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 */
DO
RCSTEP = 'FLUSHED '
END
SAY 'STEP ==>' STEP ' RC ==>' RCSTEP
TEMP_SCT = STORAGE(D2X(C2D(TEMP_SCT)+36),3)
END
EXIT |
|
|
Back to top |
|
|
asr2 Beginner
Joined: 25 Jun 2011 Posts: 26 Topics: 4 Location: Germany
|
Posted: Fri Jul 08, 2011 6:15 am Post subject: |
|
|
Thanks. This is just what I was looking for, talk about "not seeing the wood for the trees". I looked at the SCT map so many times without realising what the explanation for SCTSEXEC actaully meant.
Regards
Tony |
|
Back to top |
|
|
|
|