Bingo! Thanks! Perfect: "TCBEndingAbnormally can be used to determine whether 
STCBCMP contains an ABEND code or the contents of GPR 15 when the last program 
returned to the system."

STCBCMP: "Task completion code. STCBCMP is valid ONLY after its owning TCB has 
terminated. It may contain different information than TCBCMP because TCBCMP may 
be altered to provide an Initiator-specific final jobstep status."

I wonder if I am safe using bits 8-31 of the ECB? I am going to guess I am -- 
that any situations where it is not correct are at the very least pretty 
obscure. (I'm not writing a debugger or an ABEND analysis program -- I just 
have a situation where my program ATTACHes a subtask and I would like to put 
out a reasonable message when it quits.)
        
Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Tony Harminc
Sent: Saturday, December 12, 2015 5:26 PM
To: [email protected]
Subject: Re: How distinguish User ABEND from return code?

On 12 December 2015 at 10:24, Charles Mills <[email protected]> wrote:
> Is there a definitive "this task ABENDed" bit in the TCB? I see lots 
> of bits with "ABEND" in their description but I don't see one that 
> seems to definitively indicate simply "this task ABENDed."

I'm pretty sure you want TCBEndingAbnormally. This is defined, at least, when 
the TCB *has* ended abnormally, and the comments suggest that STCBCMP is then 
where you should be looking for the abend code, since TCBCMP may have been 
changed by that point.

There are detailed comments for several flags in the byte that holds 
TCBEndingAbnormally. IIRC, Peter Relson commented on this here a year or two 
ago.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to