Using PUSH HANDLE and POP HANDLE 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 which has not been countermanded by a matching POP HANDLE command.

When each condition occurs, CICS performs 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 to see what to do.
  2. If an entry for the condition exists, this determines the action.
  3. If no entry exists and the default action for this condition is to suspend execution:
    1. If the command has the NOSUSPEND or NOQUEUE option, control returns to the next instruction.
    2. If the command does not have one of these options, the task is suspended.
  4. If no entry exists and the default action for this condition is to abend, a second search is made, this time for the ERROR condition:
    1. If found, this entry determines the action.
    2. If ERROR cannot be found, the task is abended. You can choose to handle abends. For information about the HANDLE ABEND command, see the CICS Application Programming Reference.
Note:
The OVERFLOW condition on aSEND MAP command is an exception to the above rules. See the CICS Application Programming Reference for more information.

The commands ALLOCATE, ENQ, GETMAIN, WRITE JOURNALNAME, WRITE JOURNALNUM, READQ TD, and WRITEQ TS can all raise conditions for which the default action is to suspend your application program until the specified resource becomes available. So, on these commands, you have the NOSUSPEND option to inhibit this waiting 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:
As 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 PF key responses are ignored, and is the reason for testing them earlier in the ACCT code. See Using the HANDLE AID command.
[[ Contents Previous Page | Next Page Index ]]