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


Using edit assignment statements

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

You can use an assignment statement to pass edit parameters to a macro or to allow a macro to set an edit parameter. If the edit parameter keyphrase is on the right of the assignment statement, the edit parameter is passed to the macro. If the edit parameter keyphrase is on the left of the assignment statement, the edit parameter is changed to the value on the right. In the assignment statement shown, the edit parameter keyphrase is CAPS. The editor assigns the current CAPS edit mode status (ON or OFF) to the variable CAPMODE.
Table 1. Assigning a value to a variable
CLIST Statement REXX Statements
 
ISREDIT (CAPMODE) = CAPS
ADDRESS ISPEXEC
'ISREDIT (CAPMODE) = CAPS'
In the preceding example statements, the parentheses around CAPMODE indicate to the ISPF editor that the enclosed name is the name of a symbolic variable. If the name happened to be preceded by an ampersand (&), rather than enclosed in parentheses, the CLIST processor would replace the name of the variable with its actual value, and the editor would not see the name. In a REXX statement, the variable name must be within quotes so that the name, not the value, is passed. Only names with 8 or fewer characters are allowed by the ISPF editor.
When the editor finds a variable name in parentheses in a position where a value is required, it substitutes the value assigned to that variable. In these examples the edit macro sets the edit CAPS mode:
Table 2. Substituting a value in a variable
CLIST Statements REXX Statements
 
ISREDIT CAPS = ON
ISREDIT CAPS = (CAPMODE)
ISREDIT CAPS = &CAPMODE
ADDRESS ISPEXEC
'ISREDIT CAPS = ON'
'ISREDIT CAPS = (CAPMODE)'
'ISREDIT CAPS = 'capmode
The CLIST and REXX command processors replace the variable CAPMODE with its assigned value before the ISPF editor processes the statement. This makes the last statement equivalent to the first statement; in this case, the variable has a value of ON.

The second statement differs in that the editor receives the variable name and retrieves its value from the dialog variable pool.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014