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: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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
  • 888 views
  • 0 likes
  • 2 in conversation