At 21:39 -0400 on 10/30/2010, Micheal Butz wrote about Task Creation
and Termination:
Would there be any reason to code both the ECB parameter I guess maybe if
after the task end I might want to look at the TCBTIME to see how much time
CPU time the Task used
Am I on the right track?
As others have replied, it will allow you to do an orderly shutdown
of your subtasks - You signal the subtask to shutdown and it has once
the ECB has been posted (at which point you can do the DETACH). This
avoids the A03 ABEND that would occur if you attempted to
terminate/shutdown while there were still active Subtasks.
It also allows you to see WHY the subtask terminated (ie: In response
to a shutdown request or due to ABENDing). The ECB being posted when
you did not request it to shutdown means it is no longer there and
you can create a new subtask to replace it. Normally a running
subtask will indicate that it has done something you requested by
posting an ECB you passed it as a parm (at which point you can make
another request). Having the ATTACH ECB posted when the subtask has
not been requested to shut down means that it has gone away and needs
to be recreated.
----------------------------------------------------------------------
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