z/OS ISPF Dialog Developer's Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Return codes and error processing

z/OS ISPF Dialog Developer's Guide and Reference
SC19-3619-00

ISPF provides these system dialog variables for return code and error processing in panel REXX:

ZRXRC
Available for panel REXX to pass a return code back to ISPF. Length is 2 bytes. The corresponding REXX variable is initialized with a value of 0.
ZRXMSG
Available for panel REXX to provide a message ID used to set the .MSG value. Length is 8 bytes. The corresponding REXX variable is initialized with a value of 8 blanks.

ISPF recognizes these return codes passed back by panel REXX in the dialog variable ZRXRC:

0
Successful operation.
8
Panel REXX defined failure. ISPF sets the .MSG control variable and displays or redisplays the panel with the message.
20
Severe error in the panel REXX.

Any other return code not recognized by ISPF is treated as a severe error in the panel REXX.

When control returns to ISPF after the panel REXX has executed, if ZRXRC contains a return code of 8, ISPF sets the .MSG control variable using this search order:

  1. If the value in ZRXMSG is not blank on return to ISPF, that value is used to set the .MSG control variable.
  2. If the value in ZRXMSG is blank on return, the default ISPF panel REXX error message ISPP335 is used to set the .MSG control variable.

The panel section in which the .MSG control variable is set affects the message display as follows:

  • )INIT or )REINIT section: The message is displayed on the panel.
  • )PROC section: The panel, including the message to be displayed, is redisplayed.

If the return code in ZRXRC is either 20 or is not one of the recognized codes, the display service terminates with a severe error condition. ISPF sets the ZERRMSG system variable using this search order:

  1. If the value in ZRXMSG is not blank when control returns to ISPF, it is used to set the ZERRMSG system variable. This allows the panel REXX to define the message to be used in case of a severe error.
  2. If the value in ZRXMSG is blank when control returns to ISPF, ZERRMSG is set to ISPP336. This is the default ISPF message for severe errors relating to panel REXX.

If CONTROL ERRORS CANCEL is in effect, ISPF displays on the severe error panel the message indicated by the value of ZERRMSG.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014