Thanks everyone!
On Sun, Aug 4, 2019 at 6:55 AM Peter Relson <rel...@us.ibm.com> wrote: > <snip> > what about the normal completion reason code (R0)? > </snip> > "Normal completion reason code" is not a concept supported by z/OS. Of > course there is "value in R0 upon normal completion" but that is not > surfaced. > > The TCB/STCB has the information that is available. Since you attached > with ECB the TCB/STCB still remain, until you DETACH. > STCBCMP/STCBCMPC is the best field for the return code (whether normal or > abnormal completion). > TCBARC has the abend reason code when bit TCBRV316 is on (looks like no > one ever noticed the need to provide a suitable name for that bit, since > it is never set directly in the code -- the abend macro ends up setting > the bit into the high byte of the abend code). This is defined only for an > abend event. I don't think the RB chain is intact at the time you are > looking, so I don't think you can find the regs from > time-of-normal-completion unless they're in the TCBGRSx fields (I did not > check, but that seems very unlikely). It appears that TCBARC will have > the value from the abend's R15 whether or not REASON was specified, but > TCBRV316 will be off if REASON was not specified. > > <snip> > At ABEND, R15 contains the REASON. > </snip> > To be picky, that is true only when the ABEND was issued with the REASON > keyword. Otherwise, R15 contains a value that might or might not be > considered a reason by the ABEND invoker. > > <snip> > you can check the ABTERM flag in the subtask's TCB. > </snip> > The intended way to tell is now (and has been for quite a while) > TcbEndingAbnormally (see the comments for STCBCMP). > > > Peter Relson > z/OS Core Technology Design > > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN