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


MACRO_LEVEL—Query the Macro Nesting Level

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

The MACRO_LEVEL assignment statement retrieves the current nesting level of the macro being run, and places the nesting level in a variable.

Syntax

Read syntax diagramSkip visual syntax diagram
Assignment statement syntax

>>-ISREDIT--(varname)-- = --MACRO_LEVEL------------------------><

varname
The name of a variable to contain the macro nesting level. The nesting level is a 3-digit value that is left-padded with zeros.

Description

The nesting level can be any number between 1 (a macro that you start) and 255. MACRO_LEVEL is used to adjust processing based on whether the macro is started by you or called by another macro. It is required if labels are to be set for the starter of this macro. See LABEL—Set or Query a Line Label for more information.

Return codes

0
Normal completion
12
Invalid command format
20
Severe error

Examples

To set the label for the caller of the macro at 1 less than the current level:
ISREDIT (NESTLEV) = MACRO_LEVEL
ISREDIT LABEL .ZCSR = .XSTR &EVAL(&NESTLEV -1)

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014