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


MACRO—Identify an Edit Macro

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

The MACRO macro command identifies a command as a macro.

Syntax

Read syntax diagramSkip visual syntax diagram
Macro command syntax

                                           .-PROCESS---.   
>>-ISREDIT--MACRO--+--------------------+--+-----------+-------><
                   |    .-+---+----.    |  '-NOPROCESS-'   
                   |    | '-,-'    |    |                  
                   |    V          |    |                  
                   '-(----variable-+--)-'                  

variable
The names of the variables that contain parameters, if a macro allows parameters to be specified. Parameters are parsed and placed into the named variables in the order in which they are typed. The last variable contains any remaining parameters. Variables that do not receive a parameter are set to a null string. A parameter is a simple or quoted string, separated by blanks or commas. Quotes can be single (') or double ("), but must be matched at the beginning and end of the string.
PROCESS
Immediately processes all changes and line commands typed at the keyboard.

For edit line macros, see note under NOPROCESS.

NOPROCESS
Processes changes and line commands typed at the keyboard when the macro completes processing or a PROCESS statement is found. NOPROCESS must be used if the macro is to use line commands as input to its processing.

See PROCESS—Process Line Commands for more information.

Note: For edit line macros, the NOPROCESS keyword must be used. The PROCESS macro statement is used within the macro to set the labels relating to the line command.

For more information, see Working with an edit line command table.

Description

The MACRO macro command is required in all macros. It must be the first command in a CLIST or REXX macro that is not a CLIST or REXX statement. Similarly, it also must be the first edit command in a program macro.

Return codes

0
Normal completion
8
No parameters are permitted for this processing
12
Syntax Error
20
Severe error

Examples

To begin a macro, first accepting a member name and optionally a line number range to be placed in the variable &PARM:
ISREDIT MACRO (PARM)
ISREDIT COPY AFTER .ZCSR &PARM
To begin a macro, checking parameters before processing panel information, testing for missing input, excess input, and nonnumeric input:
ISREDIT MACRO NOPROCESS (COL,X)
IF &STR(&COL) = &STR() THEN -
  ISREDIT (,COL) = DISPLAY_COLS
ELSE -
  IF &DATATYPE(&COL) = CHAR THEN -
    GOTO MSG
  IF &STR(&X) ¬= &STR() THEN -
    GOTO MSG
ISREDIT PROCESS

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014