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
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.