EXIT (Return from Exit Routine) Macro

The macro is used to return control from your exit routine to normal processing.

Your routine is specified in the STXIT macro.

Format

Read syntax diagramSkip visual syntax diagramnameEXITABITOCPC

Requirements for the caller

AMODE:
24 or 31
RMODE:
24 or ANY
ASC Mode:
Primary

Parameters

AB
Exit from your abnormal task termination routine of your main task.
IT
Exit from your interval timer routine.
OC
Exit from your routine, which handles the operator attention interrupt of your main task.
PC
Exit from your program check routine.

Issue the EXIT macro only in the corresponding (AB, IT, OC, PC) exit routine; a cancel condition (illegal SVC) might occur if this rule is not observed.

The EXIT AB macro should be used only in main tasks. In a subtask, it would result in a cancel condition (illegal SVC). The EXIT AB macro should be issued as early as possible to enable recovery from other abnormal termination conditions. EXIT AB does not restore the original state existing prior to entry of the exit routine, that is, it does not return to the interrupted program. Control is returned from the abnormal termination routine to the instruction following the EXIT AB macro. The cancel condition and abend indication of the affected task are reset.

When your AB exit routine completes with the EXIT AB macro, the program continues with an empty linkage stack.

For IT, OC, and PC, the interrupt status information, and registers are restored from the exit save area. (From the extended save area, also the access registers are restored.) If the save area is unchanged, control is returned to the instruction in your interrupted program immediately after the instruction where the interruption occurred. By changing the save area, you can cause your program to continue from a different point or with changed register contents.

When your PC, IT, or OC exit routine completes with the corresponding EXIT PC|IT|OC macro, the program continues with the linkage stack existing at the time the EXIT macro was issued. When the exit routine completes with EXIT PC|IT|OC, the linkage stack must be equal to the linkage stack at exit entry. Otherwise, the program is canceled.

An exit routine using non-paired instructions (BAKR|PC, PR) is canceled.

STXIT Macro Issued With AMODE=24

  • If the address part of SVUPSW (see MAPSAVAR (Map Save Area) Macro) has not been changed, control is returned in the same mode to the instruction where the interruption occurred.
  • If the address part of SVUPSW has been changed, control is returned to the address and with the status that is indicated by the PSW in field SVUPSW. Since this is a BC-mode PSW, neither AR (access register) mode nor a continuation address larger than X'FFFFFF' can be specified.
  • If the exit routine uses the address part that is indicated by the PSW in field SVUPSW for problem analysis, unpredictable results (even a program check) might occur, if the interruption takes place in a program part above the 16 MB line.

STXIT Macro Issued With AMODE=ANY | ANY64

  • The program continues processing with the PSW specified at SVUAPSW (bytes 0 and 1 of the PSW are retrieved from the PSW at the time of interruption) and with the general-register and access-register content that is retrieved from the exit save area.