Dictionary
CMDMAC System Option
Controls command-style macro invocation.
Valid in: Configuration file, OPTIONS window, OPTIONS statement, SAS invocation
Category: Macro
PROC OPTIONS
GROUP=
MACRO
Type: System option
Default: NOCMDMAC
Syntax
CMDMAC | NOCMDMAC
Required Arguments
CMDMAC
specifies that the macro processor examine the first word of every windowing
environment command to see whether it is a command-style macro invocation.
Note: When CMDMAC is in effect, SAS searches the macro libraries first and
executes any member that it finds with the same name as the first word in the
windowing environment command that was issued. Unexpected results can
occur.
NOCMDMAC
specifies that no check be made for command-style macro invocations. If the macro
processor encounters a command-style macro call when NOCMDMAC is in effect, it
treats the call as a SAS command and produces an error message if the command is
not valid or is not used correctly.
Details
The CMDMAC system option controls whether macros defined as command-style
macros can be invoked with command-style macro calls or if these macros must be
invoked with name-style macro calls. These two examples illustrate command-style and
name-style macro calls, respectively:
macro-name parameter-value-1 parameter-value-2
%macro-name(parameter-value-1, parameter-value-2)
When you use CMDMAC, processing time is increased because the macro facility
searches the macros compiled during the current session for a name corresponding to the
first word on the command line. If the MSTORED option is in effect, the libraries
containing compiled stored macros are searched for a name corresponding to that word.
If the MAUTOSOURCE option is in effect, the autocall libraries are searched for a name
corresponding to that word. If the MRECALL system option is also in effect, processing
354 Chapter 20 System Options for Macros
time can be increased further because the search continues even if a word was not found
in a previous search.
Regardless of which option is in effect, you can use a name-style invocation to call any
macro, including command-style macros.
Comparisons
Name-style macros are the more efficient choice for invoking macros because the macro
processor searches only for a macro name corresponding to a word following a percent
sign.
IMPLMAC System Option
Controls statement-style macro invocation.
Valid in: Configuration file, OPTIONS window, OPTIONS statement, SAS invocation
Category: Macro
PROC OPTIONS
GROUP=
MACRO
Type: System option
Default: NOIMPLMAC
Syntax
IMPLMAC | NOIMPLMAC
Required Arguments
IMPLMAC
specifies that the macro processor examine the first word of every submitted
statement to see whether it is a statement-style macro invocation.
Note: When IMPLMAC is in effect, SAS searches the macro libraries first and
executes any macro that it finds with the same name as the first word in the SAS
statement that was submitted. Unexpected results can occur.
NOIMPLMAC
specifies that no check be made for statement-style macro invocations. This is the
default. If the macro processor encounters a statement-style macro call when
NOIMPLMAC is in effect, it treats the call as a SAS statement. SAS produces an
error message if the statement is not valid or if it is not used correctly.
Details
The IMPLMAC system option controls whether macros defined as statement-style
macros can be invoked with statement-style macro calls or if these macros must be
invoked with name-style macro calls. These examples illustrate statement-style and
name-style macro calls, respectively:
macro-name parameter-value-1 parameter-value-2;
%macro-name(parameter-value-1, parameter-value-2)
IMPLMAC System Option 355
When you use IMPLMAC, processing time is increased because SAS searches the
macros compiled during the current session for a name corresponding to the first word of
each SAS statement. If the MSTORED option is in effect, the libraries containing
compiled stored macros are searched for a name corresponding to that word. If the
MAUTOSOURCE option is in effect, the autocall libraries are searched for a name
corresponding to that word. If the MRECALL system option is also in effect, processing
time can be increased further because the search continues even if a word was not found
in a previous search.
Regardless of which option is in effect, you can call any macro with a name-style
invocation, including statement-style macros.
Note: If a member in an autocall library or stored compiled macro catalog has the same
name as an existing windowing environment command, SAS searches for the macro
first if CMDMAC is in effect. Unexpected results can occur.
Comparisons
Name-style macros are a more efficient choice to use when you invoke macros because
the macro processor searches only for the macro name that corresponds to a word that
follows a percent sign.
MACRO System Option
Controls whether the SAS macro language is available.
Valid in: Configuration file, SAS invocation
Category: Macro
PROC OPTIONS
GROUP=
MACRO
Type: System option
Default: MACRO
Syntax
MACRO | NOMACRO
Required Arguments
MACRO
enables SAS to recognize and process macro language statements, macro calls, and
macro variable references.
NOMACRO
prevents SAS from recognizing and processing macro language statements, macro
calls, and macro variable references. The item generally is not recognized, and an
error message is issued. If the macro facility is not used in a job, a small performance
gain can be made by setting NOMACRO because there is no overhead of checking
for macros or macro variables.
356 Chapter 20 System Options for Macros
MAUTOCOMPLOC System Option
Displays in the SAS log the source location of an autocall macro when the autocall macro is compiled.
Valid in: Configuration file, OPTIONS window, OPTIONS statement, SAS invocation
Category: Macro
PROC OPTIONS
GROUP=
MACRO
Type: System option
Default: NOMAUTOCOMPLOC
Syntax
MAUTOCOMPLOC | NOMAUTOCOMPLOC
Required Arguments
MAUTOCOMPLOC
displays the autocall macro source location in the SAS log when the autocall macro
is compiled.
NOMAUTOCOMPLOC
prevents the autocall macro source location from being written to the SAS log.
Details
The display created by the MAUTOCOMPLOC system option of the autocall macro
source location in the log is not affected by either the MAUTOLOCDISPLAY or the
MLOGIC system options.
MAUTOLOCDISPLAY System Option
Specifies whether to display the source location of the autocall macros in the log when the autocall macro
is invoked.
Valid in: Configuration file, OPTIONS window, OPTIONS statement, SAS invocation
Category: Macro
PROC OPTIONS
GROUP=
MACRO
Type: System option
Default: NOMAUTOLOCDISPLAY
Syntax
MAUTOLOCDISPLAY | NOMAUTOLOCDISPLAY
MAUTOLOCDISPLAY System Option 357
Required Arguments
MAUTOLOCDISPLAY
enables MACRO to display the autocall macro source location in the log when the
autocall macro is invoked.
NOMAUTOLOCDISPLAY
prevents the autocall macro source location from being displayed in the log when the
autocall macro is invoked. NOMAUTOLOCDISPLAY is the default.
Details
When both MAUTOLOCDISPLAY and MLOGIC options are set, only the MLOGIC
listing of the autocall source location is displayed.
MAUTOLOCINDES System Option
Specifies whether the macro processor prepends the full pathname of the autocall source file to the
description field of the catalog entry of compiled autocall macro definition in the Work.SASMacr catalog.
Valid in: Configuration file, OPTIONS window, OPTIONS statement, SAS invocation
Category: Macro
PROC OPTIONS
GROUP=
MACRO
Type: System option
Default: NOMAUTOLOCINDES
See: SAS log
Syntax
MAUTOLOCINDES | NOMAUTOLOCINDES
Required Arguments
MAUTOLOCINDES
causes the macro processor to prepend the full pathname of the autocall macro
source file to the description field of the catalog entry of the compiled autocall macro
definition in the Work.SASMacr catalog.
NOMAUTOLOCINDES
no changes to the description field autocall macro definitions in the Work.SASMacr
catalog.
Details
Use MAUTOLOCINDES to help determine where autocall macro definition source code
is located. The following is an example that shows the output that contains the full
pathname:
options mautolocindes;
%put %lowcase(THIS);
this
358 Chapter 20 System Options for Macros
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset