Macro Statements Listed Alphabetically
|
Name
|
Syntax and Description
|
|---|---|
|
%*commentary;
Designates comment text.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%ABORT <ABEND | CANCEL | EXIT | RETURN | <n> | <FILE>>;
Stops the macro that is executing along with the
current DATA step, SAS job, or Compute Server.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%COLORMAC;
creates the color utility macros in the current
SAS session.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference
| |
|
%COPY macro-name / <LIBRARY=libref> < OUTFILE=fileref | 'external
file'> SOURCE;
Copies specified items from a SAS macro library.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%DO %UNTIL(expression);
text and macro language statements %END;
Executes a section of a macro repetitively until
a condition is true.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%DO %WHILE (expression);
text and macro program statements %END;
Executes a section of a macro repetitively while
a condition is true.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%DO;
text and macro language statements %END;
Begins a %DO group.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%DO macro-variable=start %TO stop <%BY increment>;
text and macro language statements %END;
Executes a section of a macro repetitively based
on the value of an index variable.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%END;
Ends a %DO group.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%GLOBAL macro-variable(s);
Or
%GLOBAL / READONLY macro-variable=value;
Creates macro variables that are available during
the execution of an entire Compute Server session.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%GOTO label;
Branches macro processing to the specified label.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%HELPCLR<(ALL | macro-name)>;
writes Help information about the color utility
macros to the SAS log.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference
| |
|
%IF expression %THEN action;< %ELSE action;>
Conditionally process a portion of a macro.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%INPUT<macro-variable(s)>;
Supplies values to macro variables during macro
execution.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%label: macro-text
Identifies the destination of a %GOTO statement.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%LET macro-variable=<value>;
Creates a macro variable and assigns it a value.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%LOCAL macro-variable(s);
Or
%LOCAL / READONLY macro-variable=value;
Creates macro variables that are available only
during the execution of the macro where they are defined.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%MACRO macro-name <(parameters)> </ options>;
Begins a macro definition.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%MEND <macro-name> ;
Ends a macro definition.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%PUT <text | _ALL_ | _AUTOMATIC_ | _GLOBAL_ | _LOCAL_ | _READONLY_ | _USER_ | _WRITABLE_>;
%PUT ERROR: text | NOTE: text | WARNING: text;
%PUT ERROR- text | NOTE- text | WARNING- text;
Writes text or macro variable information to the
SAS log.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%RETURN;
Execution causes normal termination of the currently
executing macro.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%SYMDEL macro-variable(s)</option> ;
Deletes the specified variable or variables from
the macro global symbol table.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%SYSCALL call-routine< (call-routine-argument(s))>;
Invokes a SAS call routine.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%SYSEXEC <command> ;
Executes Linux commands.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%SYSLPUT macro-variable=<value></ REMOTE=server-ID>;
%SYSLPUT macro-variable-type </ option(s);>;
Creates a new macro variable or modifies the value
of an existing macro variable on a remote host or server.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%SYSMACDELETE macro_name </ option>;
Deletes a macro definition from the Work.SASMacr
catalog.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%SYSMSTORECLEAR;
Closes
the stored compiled macro catalog associated with the libref specified
in the SASMSTORE= option.
Product: Base SAS
Document: SAS Macro Language: Reference
| |
|
%SYSRPUT local-macro-variable=remote-macro-variable | value;
%SYSRPUT _USER_ < / LIKE='character-string'> ;
Assigns a value from the remote host to a macro
variable on the local host.
Product: Base SAS
Document: SAS Macro Language: Reference
|
Last updated: October 19, 2022