Chapter Contents

Previous

Next
%MEND

%MEND



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;


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.