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


Referring to labels

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

A nested macro can refer to all labels assigned by higher-level macros and to labels that you assign. When a macro assigns labels, they are associated by default with the assigning macro level. The labels are automatically removed when the macro finishes running. The labels belong to the level at which they are assigned and can have the same name as the labels at other levels without any conflict.

When a macro ends, the labels at the current nesting level are deleted. To set a label for the next higher level, the macro can issue the MACRO_LEVEL assignment statement to obtain the current level and decrease the level by 1.

A macro can determine the level of a label with the LABEL assignment statement, as shown in this syntax:
ISREDIT (varname1,varname2) = LABEL lptr
The label assigned to the referenced line is stored in the first variable and its level is stored in the second variable. If a label is not assigned to the line, a blank is stored in both variables.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014