Here is a PL/I program that displays the names and return codes of prior steps:
MTCB: PROC OPTIONS (MAIN) REORDER;
DCL AMODE24 CHAR (3) BASED,
STEP CHAR (8),
STEPNAME CHAR (8) BASED,
STUFF CHAR (64) BASED,
(STEP#, BYPASS) FIXED BIN (8) UNSIGNED,
UFXB8 FIXED BIN (8) UNSIGNED BASED,
RCSTEP FIXED BIN (16) UNSIGNED,
UFXB16 FIXED BIN (16) UNSIGNED BASED,
I FIXED BIN (31),
(TCB, TIOT, WORK, JSCB, JCT, FSCT)
POINTER,
MASK POINTER BASED;
DCL (POINTERVALUE, UNSPEC) BUILTIN;
WORK = POINTERVALUE(540);
TCB = WORK->MASK;
WORK = TCB;
WORK = TCB + 12;
TIOT = WORK->MASK;
WORK = TCB + 180;
JSCB = WORK->MASK;
WORK = JSCB;
WORK = JSCB + 261;
UNSPEC(JCT) = UNSPEC('00'X || WORK->AMODE24); /*
PUT SKIP EDIT ('JCT = ', UNSPEC(JCT)) (A, B(32)); */
WORK = JSCB + 228;
STEP# = WORK->UFXB8;
WORK = JCT + 48;
UNSPEC(FSCT) = UNSPEC('00'X || WORK->AMODE24);
DO I = 1 TO STEP#-1;
WORK = FSCT + 68;
STEP = WORK->STEPNAME;
WORK = FSCT + 24;
RCSTEP = WORK->UFXB16;
WORK = FSCT + 188;
BYPASS = WORK->UFXB8;
IF (BYPASS = 128) THEN
PUT SKIP EDIT ('STEP ==>', STEP, ' FLUSHED') (A, A, A);
ELSE
PUT SKIP EDIT ('STEP ==>', STEP, ' RC ==>', RCSTEP)
(A, A, A, F(4));
WORK = FSCT + 36;
UNSPEC(FSCT) = UNSPEC('00'X || WORK->AMODE24);
END;
END MTCB;
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day