Previous Page | Next Page

System Options for Macros

MINOPERATOR System Option



Controls whether the macro processor recognizes and evaluates the IN (#) logical operator.
Valid in:

Configuration file

OPTIONS window

OPTIONS statement

SAS invocation

Type: System option
Default: NOMINOPERATOR
PROC OPTIONS GROUP= MACRO

Syntax
Details

Syntax

MINOPERATOR | NOMINOPERATOR

MINOPERATOR

causes the macro processor to recognize and evaluate both the mnemonic operator IN or the special character # as a logical operator in expressions.

NOMINOPERATOR

causes the macro processor to recognize both the mnemonic operator IN and the special character # as regular characters.


Details

Use the MINOPERATOR system option or in the %MACRO statement if you want to use the IN (#) as operators in expressions:

options minoperator;

To use IN or # as operators in expressions evaluated during the execution of a specific macro, use the MINOPERATOR keyword on the definition of the macro:

%macro macroname / minoperator;

The macro IN operator is similar to the DATA step IN operator, but not identical. The following is a list of differences:

The following example uses the macro IN operator to search a character string:
%if &state in (NY NJ PA) %then %let &region = %eval(&region + 1);

For more information, see Defining Arithmetic and Logical Expressions.

Previous Page | Next Page | Top of Page