Search notes:

SAS programming - macro statement: %macro

The %macro statement is used to define a macro. The definition of the macro is associated with the macro's name which follows: %macro:
%macro TQ84;
  macro definition
  goes here.

  &macro_variables are not resolved
  when the macro is compiled

  %macros are not executed when then
  macro is compiled.
%mend TQ84;
The macro processor stores the definition in a macro catalog.
Everything outside of such a macro definition is referred to as open code.

Session compiled macros

By default, SAS stores a macro in the WORK library.
Such macros are called session compiled macros.
Obviously, they are lost after a session terminates.

See also

macro statements
using macros
Use the dictionary.catalog dictionary table to select/show available macros.

Index