Storing Macro Definitions in External Files

The %INCLUDE Statement

One way to store macro programs permanently is to save them to an external file. You can then use the %INCLUDE statement to insert the statements that are stored in the external file into a program. If the external file contains a macro definition, the macro is compiled when the %INCLUDE statement is submitted. Then the macro can be called again later in the same program, or anytime later in the current SAS session.
Note: %INCLUDE is a global SAS statement, not a macro statement.
Syntax, %INCLUDE statement:
%INCLUDE file-specification </SOURCE2>;
file-specification
describes the location of the file that contains the SAS code to be inserted.
SOURCE2
causes the ...

Get SAS Certified Professional Prep Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.