<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".

Peter Relson
z/OS Core Technology Design


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

Reply via email to