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

Good evening,

I haven't used SAS in awhile, and so before beginning writing my new program, I wanted to be sure an old program ran well.  I am using a different computer than what I used last time I ran SAS, so I took my data files and changed the location on the original program (original data was on an A drive; now it's on a D drive), and tried running the program. 

I have a number of errors, but at the most basic level, it is not finding my data files.  Here is the message I receive:

 

ERROR: Physical file does not exist,
/var/lib/sasstudio/studioconfig/D:\large70.txt.
ERROR: Insufficient authorization to access
/var/lib/sasstudio/studioconfig/D:\lzvgk.out.
 
This is how I entered my data files:
 
Filename lrg 'D:\large70.txt';
74 Filename tbil 'D:\tbill70.txt';
75 Filename sml 'D:\small70.txt';
76 Filename gov 'D:\govbond70.txt';
77 Filename corp 'D:\corpbond70.txt';
78 Filename DCA1 'D:\lzvgk.out';
79 Filename DCA2 'D:\Tgzv.out';
80 Filename DCA3 'D:\small1.out';
81 Filename DCA4 'D:\govbond1.out';
82 Filename DCA5 'D:\corpbond1.out';
83 Libname SASDATA 'D:\kleggio';
As I mentioned, this file did work previously (although it may be a new version of SAS since I ran this last.)

Thanks very much for your help.
1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

Your SAS session runs on a remote UNIX (most probably Linux) server that does not have the concept of drives and drive letters.

To access external (to SAS) files you need to

  • store them in a location that is also accessible from the SAS server
  • or upload them, either with the upload facility of SAS Studio, the Copy Files task of Enterprise Guide, or with a file copy utility like WinSCP

Either way, you have to use UNIX filename syntax (forward slashes to separate directories, and starting at the UNIX root (/). Using ~ or $HOME to address your personal home directory implies this.

 

How do you access SAS?

View solution in original post

4 REPLIES 4
Astounding
PROC Star

When I see a mix of forward slashes and backward slashes, it makes me think you haven't figured out the right way to refer to a file.  That would be the place to start.

ChrisNZ
Tourmaline | Level 20

Why are you using Windows paths on a Linux/Unix machine?

Ask for the location of these files if you don't know.

 

Fyi the part in red is a Unix path, the part in blue is a Windows path.

/var/lib/sasstudio/studioconfig/D:\large70.txt

 

 

 

 

Kurt_Bremser
Super User

Your SAS session runs on a remote UNIX (most probably Linux) server that does not have the concept of drives and drive letters.

To access external (to SAS) files you need to

  • store them in a location that is also accessible from the SAS server
  • or upload them, either with the upload facility of SAS Studio, the Copy Files task of Enterprise Guide, or with a file copy utility like WinSCP

Either way, you have to use UNIX filename syntax (forward slashes to separate directories, and starting at the UNIX root (/). Using ~ or $HOME to address your personal home directory implies this.

 

How do you access SAS?

6071
Fluorite | Level 6
Thanks; this is a different way to access SAS than what I used last time, and the conventions are different. You resolved the issue for me. I appreciate it.

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1242 views
  • 0 likes
  • 4 in conversation