Chapter Contents |
Previous |
Next |
IMPLMAC |
Type: | System option | ||||
Can be specified in: |
| ||||
Default: | NOIMPLMAC |
Syntax | |
Details | |
Tip |
Syntax |
IMPLMAC | NOIMPLMAC |
Note: When IMPLMAC is in effect, SAS searches the macro
libraries first and executes any macro it finds with the same name as the
first word in the SAS statement that was submitted. This can produce unexpected
results.
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)
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 those defined as 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 and unexpected results can occur.
Tip |
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.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.