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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

New Learning Events in April

 

Join us for two new fee-based courses: Administrative Healthcare Data and SAS via Live Web Monday-Thursday, April 24-27 from 1:00 to 4:30 PM ET each day. And Administrative Healthcare Data and SAS: Hands-On Programming Workshop via Live Web on Friday, April 28 from 9:00 AM to 5:00 PM ET.

LEARN MORE

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