z/OS ISPF Edit and Edit Macros
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Selecting control for errors

z/OS ISPF Edit and Edit Macros
SC19-3621-00

As explained in Return codes from PDF edit macro commands, every edit macro statement causes variable &LASTCC (CLIST) or RC (REXX) to be set to a return code. Return codes of 12 or higher are considered errors (except for the PROCESS edit macro command return code of 12), and the default is to end macros that issue those return codes.

Sometimes you need to handle errors at the time that they occur. The error is expected and the edit macro logic can handle the problem. If you want to handle all errors that might occur in your macro, you can include this statement:
ISPEXEC CONTROL ERRORS RETURN
If errors occur, control returns to the macro. On the other hand, to return error handling to the default mode, include this statement:
ISPEXEC CONTROL ERRORS CANCEL
If an error occurs, the macro ends.

If you want to do both, you can include any number of ISPEXEC CONTROL statements in your macro to turn error handling on and off.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014