Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
DETACH — Detach a subtask z/OS MVS Programming: Assembler Services Reference ABE-HSP SA23-1369-00 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
DescriptionThe DETACH macro removes from the system a subtask created using the ATTACH (or ATTACHX) macro with the ECB or ETXR parameters. Subtasks created using the ATTACH macro without specifying the ECB or ETXR parameters are automatically removed by the system when they terminate. If a task attaches a subtask with the ECB or ETXR parameters, the originating task must detach the subtask before terminating. You can issue a DETACH macro only for subtasks created by the active task. EnvironmentThe requirements for the caller are:
Programming requirementsIf your program is in AR mode, issue the SYSSTATE ASCENV=AR macro before you issue DETACH. Restrictions
Input register informationBefore issuing the DETACH macro, the caller does not have to place any information into any register unless using it in register notation for a particular parameter, or using it as a base register. Output register informationWhen control returns to the caller, the GPRs contain:
When control returns to the caller, the access registers (ARs)
contain:
Some callers depend on register contents remaining the same before and after issuing a service. If the system changes the contents of registers on which the caller depends, the caller must save them before issuing the service, and restore them after the system returns control. Performance implicationsNone. SyntaxThe DETACH macro is written as follows:
ParametersThe parameters are explained as follows:
ABEND codesThe caller of DETACH might receive one of the following ABEND codes:
See z/OS MVS System Codes for explanations and responses to these codes. Return and reason codesWhen control is returned, register 15 contains one of the following return codes:
Example 1Remove the subtask from the address space. The address of the
TCB is in the fullword labeled SAVEWORD.
Example 2In addition to removing the subtask from the address space, give
control to the most recent STAE exit established by the subtask if
the subtask has not yet been terminated.
|
Copyright IBM Corporation 1990, 2014
|