IMPLMAC System Option

Controls statement-style macro invocation.
Valid in: Configuration file OPTIONS windowOPTIONS statement SAS invocation
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 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)
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.