TYPE=ABTERM

If the CALLRTM macro specifies TYPE=ABTERM, system processing is directed toward the specified task. The following locking and save area requirements apply to this form of CALLRTM:
  • To terminate the current task, you can specify (or default to) TCB=0, or specify TCB= as the address of the current task's TCB, or specify TTOKEN= as the TTOKEN of the current task. Regardless of how the current task is specified, you must also specify the ASID= parameter using the current ASID.

    In this form of ABTERM, the caller may (but is not required to) hold the local lock. This ABTERM request will be processed asynchronously via an SRB. To prevent the current task from running while the SRB is implementing the requested ABTERM, the current task should be placed into a wait state on an ECB that will never be posted.

    To terminate the current task immediately rather than asynchronously, issue the ABEND macro instead of CALLRTM.

  • To terminate a task other than the current task in the same address space, you can either specify TCB= as the address of the target task's TCB, or specify TTOKEN= as the TTOKEN of the target task. Do not specify the ASID= parameter. In this form of ABTERM, the caller must hold the local lock. To avoid holding the local lock, you can treat the task as one in a different address space and issue the ABTERM with the ASID= parameter.
  • To terminate a task in a different address space, you can either specify TCB= as the address of the target task's TCB, or specify TTOKEN= as the TTOKEN of the target task. Regardless of how the target task is specified, you must also specify the ASID= parameter as the target ASID.

    In this form of ABTERM, the caller may (but is not required to) hold the local lock. This ABTERM request will be processed asynchronously via an SRB. It is better to specify the TTOKEN= parameter than the TCB address because the TCB address might be re-used before the SRB actually runs, which could lead to the wrong task being terminated.

Note: The required work area that you provide when you specify either TTOKEN or ASID is not the standard 72-byte save area. The system stores into the first 8 bytes of the area, which are commonly used for save area chaining. If you pass the save area in register 13 that you are using to link your program to your caller's, you will not be able to get back to your caller.
Through the use of the following parameters, valid with TYPE=ABTERM, it is possible to specify what happens once the system receives control.
  • DUMP specifies whether a dump should be taken. DUMPOPT and DUMPOPX are optional parameters which allow you to determine the contents of the dump by specifying the address of a parameter list of dump options.
  • STEP indicates whether the job step should be abnormally terminated.
  • RETRY specifies whether the caller's recovery routines can retry. Specifying RETRY=NO will turn on the SDWACLUP bit and force all recovery routines to percolate rather than retry.