I have used FTP to put some sas7bdat files into a particular directory called "sas_work1". The "util_bas.sas" file which is referred to below is also in this directory. This directory as seen on WinSCP is located at the <root>. My code currently runs into an error with the line below:
%include "sas_work1/util_bas.sas";
The error is "Error: Cannot open %INCLUDE file sas_work1/util_bas.sas" and the note is that the "Physical file does not exist, /sasuserhome/zkj/sas_work1/util_bas.sas."
SAS is clearly only looking at files under /sasuserhome/zkj/ but I do not have enough space in this location and have thus moved my files to another directory. Is there a way to get SAS to look directly at the <root> rather than at /sasuserhome/zkj/?
Thanks
Hello @Sid9,
you are using a relative path.Try with an absolute path, meaning /my_directory/sas_work1/util_bas.sas in opposition to sas_work1/util_bas.sas. Please not the / sign at the beginning which means "root directory".
Hello @Sid9,
you are using a relative path.Try with an absolute path, meaning /my_directory/sas_work1/util_bas.sas in opposition to sas_work1/util_bas.sas. Please not the / sign at the beginning which means "root directory".
If Juan's suggestion doesn't fix you up, another issue on a grid is that your code may run on different grid nodes, so your file has to be in a directory that's visible from all the nodes. Your grid administrator can help you select the correct directory.
Tom
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.