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


Return codes from user-written edit macros

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

A macro can issue the return codes shown here. These return codes affect the command line and cursor position on the next display of edit data:
0
Shows normal completion of the macro. The cursor position is left as set by the macro. The command line is blanked.
1
Shows normal completion of the macro. The cursor is placed on the command line and the line is blanked. Use this return code to make it easy to enter another macro or edit command on the command line.
4 and 8
Treated by the ISPF editor as return code 0. No special processing is done.
12 and higher
Error return codes. The cursor is placed on the command line and the macro command remains. When used with these return codes, the dialog manager SETMSG service prompts you for an incorrect or omitted parameter.

Any invocation of a disabled macro command issues a return code of 12. See the DEFINE command for more information on disabled commands.

20 and higher
Indicate a severe error. The meanings of the severe return codes are:
20
Command syntax error or Dialog service routine error.
24
Macro nesting limit of 255 exceeded (possible endless loop; see the BUILTIN macro command).
28
Command found either preceding the ISREDIT MACRO command, or following the ISREDIT END or ISREDIT CANCEL command.
Each command description in Edit macro commands and assignment statements includes a list of return codes that are possible for the command. Because &LASTCC (CLIST) or RC (REXX) is set for every statement, you must either test it in the statement immediately following the command that sets it, or you must save its value in another variable. Use a command such as:
SET &RETCODE = &LASTCC
The variable (&RETCODE or RETCODE) can then be tested anywhere in the macro until it is changed.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014