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


SCAN—Set Command Scan Mode

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

The SCAN macro command sets scan mode, which controls the automatic replacement of variables in command lines passed to the editor.

The SCAN assignment statement either sets the value of scan mode (for variable substitution), or retrieves the value of scan mode and places it in a variable.

Syntax

Read syntax diagramSkip visual syntax diagram
Macro command syntax

                  .-ON--.   
>>-ISREDIT--SCAN--+-----+--------------------------------------><
                  '-OFF-'   

ON
Specifies that the editor automatically replaces variables in command lines.
OFF
Specifies that the editor does not automatically replace variables.

Scan mode is initialized to ON when a macro is started.

Read syntax diagramSkip visual syntax diagram
Assignment statement syntax

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

Read syntax diagramSkip visual syntax diagram
                       .-ON--.   
>>-ISREDIT--SCAN-- = --+-----+---------------------------------><
                       '-OFF-'   

varname
The name of a variable to contain the setting of scan mode, either ON or OFF.
ON
Same as macro command syntax.
OFF
Same as macro command syntax.

Return codes

0
Normal completion
20
Severe error

Examples

To set a line whose number is in variable &LNUM to:
&SYSDATE is a CLIST built-in function
set scan mode off and issue the LINE command with &&SYSDATE as the CLIST function name. The CLIST processor strips off the first &, but, because scan mode is off, the editor does not remove the second &:;
ISREDIT SCAN OFF
ISREDIT LINE &LNUM = "&&SYSDATE is a CLIST built-in function"
ISREDIT SCAN ON

Because the ISPEXEC call interface for REXX EXECs allows you to specify parameters as symbolic variables, a single scan always takes place before the syntax check of a statement. Therefore, the rule of using two ampersands (&) before variable names to avoid substitution of variable names also applies to REXX EXECs.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014