BookmarkSubscribeRSS Feed
ajkalale
Obsidian | Level 7

relative path.PNG

Hi all,

 

I am having trouble setting a relative path in Unix environment. 

relative.png

 

I have uploaded the path. 

There are datasets that need to be read from this path into a macro. 

 

The purpose behind the macro is date imputation in a adam dataset.  

Please give me viable solution to this problem!

1 REPLY 1
ballardw
Super User

Recommendation: Do not use relative paths as you may not be executing where you think you are. I always start all paths with a drive identifier (running windows), or a UNC path including the server and mount point.

 

What code did you actually submit? That would likely be either a Filename or possibly and Infile statement.

 

If you try to use !sasroot you are almost always going to encounter a problem with either missing folders or permissions not allowed to write there, especially in a server environment. If you used an environment variable then that variable really needs to include a mount point or such.

 

BTW, datasets almost never should be "read into a macro". Possibly "read by a macro".

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Health and Life Sciences Learning

 

Need courses to help you with SAS Life Sciences Analytics Framework, SAS Health Cohort Builder, or other topics? Check out the Health and Life Sciences learning path for all of the offerings.

LEARN MORE

Discussion stats
  • 1 reply
  • 860 views
  • 0 likes
  • 2 in conversation