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.
CICS® also keeps a table of conditions for each PUSH HANDLE command that has not been countermanded by a matching POP HANDLE command.
- 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.
- If an entry for the condition exists, this entry determines the action.
- If no entry exists and the default action for this condition is
to suspend execution, the action is as follows:
- If the command has the NOSUSPEND or NOQUEUE option, control returns to the next instruction.
- If the command does not have the NOSUSPEND or NOQUEUE option, the task is suspended.
- If no entry exists and the default action for this condition is
to abend, CICS searches for the ERROR condition:
- If the ERROR condition is found, this entry determines the action.
- If ERROR cannot be found, the task is abended. You can choose to handle abends.
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.