Aren't you conflating DETACH and DELETE? DETACH removes "the subtask" (the TCB?) from storage.
The "program object or load module" is a different matter. It is removed -- or rather, its usage count is decremented and it is potentially removed -- by DELETE. A programmer who is ATTACHing with ECB the same load module multiple times should issue one DETACH for every ATTACH, no? DETACH may also be used before sub-task completion to ABEND the sub-task. Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of john gilmore Sent: Sunday, July 04, 2010 1:58 PM To: [email protected] Subject: Re: ECB parameter on attach If I understand you correctly, the answer to your question is no. If an issuing task supplies an ECB with an ATTACH macro the system posts it complete when the subtask created by the ATTACH completes its processing. This is usually done so that the attaching task can use a WAIT macro to wait upon and be notified by the system of the completion of the subtask. The system does not, however, remove the program object or load module executed by this subtask from storage, which is an advantage if subtasks that use it are attached repeatedly. For this reason the attaching task must issue a DETACH macro for the subtask before it itself terminates. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

