Return to Homepage

Goto the Tip of the Month Archive

Other interesting pages ...
LinkedIn Profile
SAS Cheat Sheet
Useful SAS Code
Full SAS Example
Basic Statistics
Contact Information

SAS Tip of the Month
November 2012
(for SAS and WPS)

When including external SAS files in your program, the main way I see it done is using the %INCLUDE statement as shown below:

   %include "c:\temp\file1.sas";
   %include "c:\temp\file2.sas";

In the case where you are bringing in a number of SAS programs from a single directory, a useful alturnative is to use a FILENAME statement that points to a single directory, and then use the %INCLUDE statement as shown below:

   filename inpgm "c:\temp";
   %include inpgm(file1.sas);
   %include inpgm(file2.sas);
   run;

Hope this is useful. Have a safe and happy November.

See you next month.

________________________________
Updated November 06, 2012