Chapter Contents

Previous

Next
IMPLMAC

IMPLMAC



Controls statement-style macro invocation

Type: System option
Can be specified in:
Configuration file
OPTIONS window
OPTIONS statement
SAS invocation
Default: NOIMPLMAC


Syntax
Details
Tip

Syntax

IMPLMAC | NOIMPLMAC

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. This can produce unexpected results.  [cautionend]

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:

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.  [cautionend]


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.