Previous Page | Next Page

Macro Statements

%MEND Statement



Ends a macro definition.
Type: Macro statement
Restriction: Allowed in macro definitions only

Syntax
Example
Ending a Macro Definition

Syntax

%MEND <macro-name>;

macro-name

names the macro as it ends a macro definition. Repeating the name of the macro is optional, but it is useful for clarity. If you specify macro-name, the name in the %MEND statement should match the name in the %MACRO statement; otherwise, SAS issues a warning message.


Example


Example 1: Ending a Macro Definition

%macro disc(dsn);
   data &dsn;
      set perm.dataset;
      where month="&dsn";
   run;
%mend disc;

Previous Page | Next Page | Top of Page