You can use Spool Dataset Browse to dynamically allocate the EVENTLOG STEPDATA dataset which has this information (and it is IBM blessed): https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.hasc300/accevnt.htm
Also, the z/OSMF REST JOBs api can give this back to you in JSON: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.izua700/IZUHPINFO_API_GetJobStatus.htm On Mon, Nov 26, 2018 at 2:42 PM Seymour J Metz <[email protected]> wrote: > It is relatively easy to retrieve the Step Control Table (SCT) for each > step and check the return code, but I don't know how to do it in a way that > IBM will bless; AFAIK the relevant control blocks are not GUPI. > > > -- > Shmuel (Seymour J.) Metz > http://mason.gmu.edu/~smetz3 > > ________________________________________ > From: IBM Mainframe Discussion List <[email protected]> on behalf > of Bernd Oppolzer <[email protected]> > Sent: Monday, November 26, 2018 3:29 PM > To: [email protected] > Subject: Compute the maximum return code of all steps (so far) > > Hello list, > > I have the need to compute (in a C, PL/1 or ASSEMBLER module) > the maximum return code of all prior steps of the running job so far. > > This is intended to be the last step of the job and to write the MAXRC > into a DB2 table, which shows the requester the outcome of this > special job (in a series of maybe hundred jobs which he or she > activated by a sort of makefile). > > At the moment this is done by a series of steps named RC0, RC4, RC8 > and so on, which are activated when the MAXRC falls into the appropriate > range, and then the MAXRC value is written to an ISPF table. I am modifying > this into using a DB2 table, because we had some problems in the past due > to parallel use of the ISPF table involved, which lead to bad situations > (ENQs). > In this context I thought about replacing this bunch of steps by one. > > Is this possible? What is needed? > Is there a place where the MAXRC is stored, or is it necessary to retrieve > the RCs of the different steps and compute the MAXRC value myself? > What if one of the steps ABENDed? > > It is of course possible to keep the JCL-IF-logic and only replace the > ISPF table by DB2 ... this is what I would do if the computation of the > RCs etc. is too difficult. > > Many thanks for your suggestions; > have a nice day. > > Bernd > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
