Previous Page | Next Page




in macro processing, a character string that is used by a macro function.

arithmetic expression

a type of macro expression that consists of a sequence of arithmetic operators and operands. An arithmetic expression returns a numeric value when it is executed.

autocall facility

a feature of SAS that enables you to store the source statements that define a macro and to invoke the macro as needed, without having to include the definition in your program.

autocall macro

a macro whose uncompiled source code and text are stored in an autocall macro library. Unlike a stored compiled macro, an autocall macro is compiled before execution the first time it is called.

command-style macro

a macro that is defined with the CMD option in the %MACRO statement. See also statement-style macro and name-style macro.

constant text

the character strings that are stored as part of a macro or as a macro variable's value in open code, from which the macro processor generates text to be used as SAS statements, display manager commands, or other macro program statements. Constant text is also called model text. See also open code.

dummy macro

a macro that the macro processor compiles but does not store.

global macro variable

a macro variable that can be referenced in either global or local scope in a SAS program, except where there is a local macro variable that has the same name. A global macro variable exists until the end of the session or program. See also local macro variable.

global scope

in SAS macro programming, indicates broad context boundaries for referencing global macro variables; that is, anywhere within the current SAS session or SAS batch program. See also local scope.

input stack

the most recently read line of input from a SAS program and any text generated by the macro processor that is awaiting processing by the word scanner. See also word scanner.

keyword parameter

a macro parameter that is defined with an equal sign after the parameter name, as in parameter-name=.

local macro variable

a macro variable that is available only within the macro in which it was created and within macros that are invoked from within that macro. A local macro variable ceases to exist when the macro that created it stops executing. See also global macro variable.

local scope

in SAS macro programming, indicates narrowed context boundaries for referencing local macro variables; that is, limited to the current macro. See also global scope.

logical expression

a type of macro expression that consists of a sequence of logical operators and operands. A logical expression returns a value of either true or false when it is executed.


a SAS catalog entry that contains a group of compiled program statements and stored text.

macro call

within a SAS program, a statement that invokes (or calls) a stored compiled macro program. You use the syntax %macro-name; to call a macro.

macro compilation

the process of converting a macro definition from the statements that you enter to a form that is ready for the macro processor to execute. The compiled macro is then stored for later use in the SAS program or session.

macro execution

the process of following the instructions that are given by compiled macro program statements in order to generate text, to write messages to the SAS log, to accept input, to create or change the values of macro variables, or to perform other activities. The generated text can be a SAS statement, a SAS command, or another macro program statement.

macro expression

any valid combination of symbols that returns a value when it is executed. The three types of macro expressions are text, logical, and arithmetic. A text expression generates text when it is resolved (executed) and can consist of any combination of text, macro variables, macro functions, and macro calls. A logical expression consists of logical operators and operands and returns a value of either true or false. An arithmetic expression consists of arithmetic operators and operands and returns a numeric value.

macro facility

a component of Base SAS software that you can use for extending and customizing SAS programs and for reducing the amount of text that must be entered in order to perform common tasks. The macro facility consists of the macro processor and the macro programming language.

macro function

a function that is defined by the macro facility. Each macro function processes one or more arguments and produces a result.

macro invocation

another term for macro call. See also macro call.

macro language

the programming language that is used to communicate with the macro processor.

macro processor

the component of SAS software that compiles and executes macros and macro program statements.

macro quoting

a function that tells the macro processor to interpret special characters and mnemonics as text rather than as part of the macro language. See also quoting.

macro variable

a variable that is part of the SAS macro programming language. The value of a macro variable is a string that remains constant until you change it. Macro variables are sometimes referred to as symbolic variables.

macro variable reference

the name of a macro variable, preceded by an ampersand (&name). The macro processor replaces the macro variable reference with the value of the specified macro variable.

model text

another term for constant text. See also constant text.

name-style macro

a macro that is named and defined with the %MACRO statement. See also command-style macro and statement-style macro.

null value

in the SAS macro language, a value that consists of zero characters.

open code

the part of a SAS program that is outside any macro definition.


a local macro variable that is defined within parentheses in a %MACRO statement. You supply values to a macro parameter when you invoke a macro. See also keyword parameter and positional parameter.

positional parameter

a parameter that is defined by name only. The parameter's value is assigned by matching the parameter (which is in a particular position in the %MACRO statement) with the value that is in the corresponding position (delimited by commas) in the macro invocation.


the process that causes the macro processor to read certain items as text rather than as symbols in the macro language. Quoting is also called removing the significance of an item and treating an item as text.

quoting function

a macro language function that performs quoting on its argument.

reserved word

a name that is reserved for use by an internal component of a software application and which therefore cannot be assigned by a user of that application to any type of data object.

returned value

a character string that is the result of the execution of a macro function.

SAS compilation

the process of converting statements in the SAS language from the form in which you enter them to a form that is ready for SAS to use.

SAS variable

a column in a SAS data set or in a SAS data view. The data values for each variable describe a single characteristic for all observations. Each SAS variable can have the following attributes: name, data type (character or numeric), length, format, informat, and label. See also macro variable.


in programming, the enclosing context for associated values and expressions. In SAS macro programming, the scope can be either global or local, which will determine how values are assigned to a macro variable and how the macro processor resolves references to it. See also global macro variable and local macro variable.

session compiled macro

a macro that the macro processor compiles and stores in a SAS catalog in the WORK library. These macros exist only during the current SAS session. Unlike stored compiled macros, session compiled macros cannot be called in any other SAS session.

statement-style macro

a macro that is defined with the STMT option in the %MACRO statement. See also command-style macro and name-style macro.

stored compiled macro

a macro program that was compiled in a previous session and which was stored in a permanent directory. Unlike session compiled macros, stored compiled macros can be called in any SAS program.


in the SAS macro language, any group of consecutive characters. See also character string.

symbol table

the area in which the macro processor stores all macro variables and macro statement labels for a particular scope.

symbolic substitution

the process of resolving a macro variable reference (&variable-name) to its value. See also macro variable reference.

symbolic variable

another term for macro variable. See also macro variable.

text expression

a type of macro expression that generates text when it is resolved (executed). The text expression can include any combination of text, macro variables, macro functions, and macro calls.


the unit into which the SAS language or the macro language divides input in order to enable SAS to process that input. Tokens (also called words) include items that look like English words (such as variable names) as well as items that do not (such as mathematical operators and semicolons).


the part of the word scanner that divides input into tokens (also called words). See also token and word scanner.


the process of restoring the meaning of a quoted item. See also quoting.


See macro variable, SAS variable.


another term for token. See also token.

word scanner

the component of SAS that examines all tokens (words) in a SAS program and moves the tokens to the correct component of SAS for processing.

Previous Page | Next Page | Top of Page