BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Sid9
Fluorite | Level 6

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

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
JuanS_OCS
Azurite | Level 17

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".

View solution in original post

2 REPLIES 2
JuanS_OCS
Azurite | Level 17

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".

TomKari
Onyx | Level 15

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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1275 views
  • 1 like
  • 3 in conversation