positional parameter, the macro facility assigns a
null value to that parameter.
keyword-
parameter=<value>
<,keyword-
parameter-2=<value> ...>
names one or more macro parameters followed
by equal signs. You can specify default values
after the equal signs. If you omit a default value
after an equal sign, the keyword parameter has a
null value. Using default values enables you to
write more flexible macro definitions and
reduces the number of parameters that must be
specified to invoke the macro. To override the
default value, specify the macro variable name
followed by an equal sign and the new value in
the macro invocation.
Note: You can define an unlimited number of parameters. If both positional and
keyword parameters appear in a macro definition, positional parameters must
come first.
option(s)
can be one or more of these optional arguments:
CMD
specifies that the macro can accept either a name-style invocation or a command-
style invocation. Macros defined with the CMD option are sometimes called
command-style macros.
Use the CMD option only for macros that you plan to execute from the command
line of a SAS window. The SAS system option CMDMAC must be in effect to
use command-style invocations. If CMDMAC is in effect and you have defined a
command-style macro in your program, the macro processor scans the first word
of every SAS command to see whether it is a command-style macro invocation.
When the SAS system option NOCMDMAC option is in effect, the macro
processor treats only the words following the % symbols as potential macro
invocations. If the CMDMAC option is not in effect, you still can use a name-
style invocation for a macro defined with the CMD option.
DES='text'
specifies a description for the macro entry in the macro catalog. The description
text can be up to 256 characters in length. Enclose the description in quotation
marks. This description appears in the CATALOG window when you display the
contents of the catalog containing the stored compiled macros. The DES= option
is especially useful when you use the stored compiled macro facility.
MINDELIMITER='single character';
specifies a value that will override the value of the MINDELIMITER= global
option. The value must be a single character enclosed in single quotation marks
and can appear only once in a %MACRO statement.
Restriction
The following characters cannot be used as a delimiter
% & ' " ( ) ;
MINOPERATOR | NOMINOPERATOR
specifies that the macro processor recognizes and evaluates the mnemonic IN
and the special character # as logical operators when evaluating arithmetic or
logical expressions during the execution of the macro. The setting of this
argument overrides the setting of the NOMINOPERATOR global system option.
326 Chapter 19 • Macro Statements