POP HANDLE

Restore the stack.

POP HANDLE

Read syntax diagramSkip visual syntax diagramPOP HANDLE

Condition: INVREQ

This command is threadsafe.

Description

Use the POP HANDLE command to restore the effect of IGNORE CONDITION, HANDLE ABEND, HANDLE AID, and HANDLE CONDITION commands to the state they were in before a PUSH HANDLE command was executed at the current link level.

Restriction: This command is supported only in COBOL, PL/I, and assembler language applications (but not AMODE(64) assembler language applications). It is not supported in all other supported high level languages.

This command can be useful, for example, during a branch to a subroutine embedded in a main program.

Normally, when a CICS® program calls a subroutine (at the same logical level), the program or routine that receives control inherits the current HANDLE commands. These commands might not be appropriate in the called program. The called program can use PUSH HANDLE to suspend existing HANDLE commands, and before returning control to the caller, can then restore the original commands using the POP HANDLE command.

Note: When a CICS program uses EXEC CICS LINK to call another CICS program, the HANDLE effects are not inherited by the linked-to program, but CICS will search preceding logical levels for a HANDLE ABEND exit. See Abnormal termination recovery for further details about the relationship between LINK and HANDLE ABEND.

You can nest PUSH HANDLE ... POP HANDLE command sequences within a task. Each POP HANDLE command restores a set of specifications.

Conditions

16 INVREQ
Occurs if no matching PUSH HANDLE command has been executed at the current link level.

Default action: terminate the task abnormally.