Using PUSH HANDLE and POP HANDLE commands

The PUSH HANDLE and POP HANDLE commands suspend and reinstate, respectively, the effects of HANDLE CONDITION, IGNORE CONDITION, HANDLE ABEND, and HANDLE AID commands.

PUSH HANDLE
Suspends the current effect of HANDLE CONDITION, IGNORE CONDITION, HANDLE ABEND, and HANDLE AID commands.
POP HANDLE
Reinstates the effect of HANDLE CONDITION, IGNORE CONDITION, HANDLE ABEND, and HANDLE AID commands to what they were before the previous PUSH HANDLE was called.
Restriction: These commands are supported only in COBOL, PL/I, and assembler language applications (but not AMODE(64) assembler language applications). They are not supported for all other supported high level languages.

CICS® also keeps a table of conditions for each PUSH HANDLE command that has not been countermanded by a matching POP HANDLE command.

When each condition occurs, CICS uses the following sequence of tests:
  1. If the command has the RESP or NOHANDLE option, control returns to the next instruction in your application program. Otherwise, CICS scans the condition table.
  2. If an entry for the condition exists, this entry determines the action.
  3. If no entry exists and the default action for this condition is to suspend execution, the action is as follows:
    1. If the command has the NOSUSPEND or NOQUEUE option, control returns to the next instruction.
    2. If the command does not have the NOSUSPEND or NOQUEUE option, the task is suspended.
  4. If no entry exists and the default action for this condition is to abend, CICS searches for the ERROR condition:
    1. If the ERROR condition is found, this entry determines the action.
    2. If ERROR cannot be found, the task is abended. You can choose to handle abends.
Note: The OVERFLOW condition on a SEND MAP command is an exception to the rules.

The ALLOCATE, ENQ, GETMAIN, WRITE JOURNALNAME, WRITE JOURNALNUM, READQ TD, and WRITEQ TS commands can all raise conditions for which the default action is to suspend your application program until the specified resource becomes available. Therefore, on these commands, you can use the NOSUSPEND option to inhibit this wait and return immediately to the next instruction in your application program.

Some conditions can occur during the execution of a number of unrelated commands. If you want the same action for all occurrences, code a single HANDLE CONDITION command at the start of your program.

Note: Because using RESP implies NOHANDLE, be careful when using RESP with the RECEIVE command, because it overrides the HANDLE AID command as well as the HANDLE CONDITION command. This means that function key responses are ignored, and is the reason for testing them earlier in the ACCT code. See Using the HANDLE AID command.