Right. I only know for a fact that all of the swans I have ever seen were
white.

I believe what is happening is that the DETACH is posting the ATTACH
completion ECB and therefore making it available to be waited upon again.
Because my ESTAEX exit code, that always WAITs on the same ECB following the
DETACH, never* ABENDs S301.

I am going to remove the WAIT because it is apparently superfluous. Were it
not superfluous it would be ABENDing S301.

*Never in my experience, of course. One machine, one LPAR, one z/OS, one
program, one short timeframe.

> Isn't that what began this whole discussion?

Yes. At that point I did not know exactly what was happening. I was getting
mysterious results and was looking for clues. I was getting a UNIX program
that was failing because some other process already owned signal processing
-- and the task that previously owned it should have already been terminated
and cleaned up. Grasping at straws, I wondered "could I be coming through my
ESTAEX exit twice? Or might the DETACHed task not really be done cleaning up
(not complete, ECB not posted)?" I think I now understand the whole process
pretty well.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Peter Relson
Sent: Saturday, August 1, 2020 5:33 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: ESTAEX exit WAIT question

<snip>
I know for a fact that DETACH causes (via some route) the ECB to be 
posted.
</snip>

To be snide, I'd say that you know for a fact that in all the cases you've 
seen DETACH causes the ECB to be posted.
That's not the same as "know for a fact". Fortunately, it is a fact. 

DETACH processing "steals" the field used to hold the address of the 
attach ECB for a while so that the system can wait for the task to 
terminate. Once that has happened, DETACH processing posts the 
ATTACH-specified ECB.

<snip>
I always WAIT on the ATTACH ECB and it always works.
</snip>
Isn't that what began this whole discussion? You wanted to wait for the 
DETACH from your recovery to complete and wanted to do so by waiting on 
the ATTACH ECB (your mainline had already been waiting on it as part of an 
ECB list). You can't just do that because you'd get a 301 abend -- the ECB 
is already marked waiting and nothing in the path that would have gotten 
you into recovery would have changed that ECB. So "it always works" is not 
"a fact". Perhaps what is a fact is the wait that you have chosen to do 
(in the mainline) always works. To avoid the 310 abend, the question would 
arise of "can you just change the ECB not to be waiting anymore?" and the 
answer would be at best "maybe". Perhaps fortunately, the better response 
is "there is no need to do so if you're going to do a DETACH and want to 
continue only once the task has terminated".

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to