The following excerpt from my SAS Studio 3.8 log describes an error caused by a nonexistent file whose name begins with the letters /pbr. Could someone please tell me what might be going wrong?
Thanks
78 libname home '/home/u57995729';
NOTE: Libref HOME was successfully assigned as follows:
Engine: V9
Physical Name: /home/u57995729
79 libname sasuser2 '/home/u57995729/sasuser.v94';
NOTE: Libref SASUSER2 refers to the same physical library as SASUSER.
NOTE: Libref SASUSER2 was successfully assigned as follows:
Engine: V9
Physical Name: /home/u57995729/sasuser.v94
80 libname weight '/home/u57995729/Weight';
NOTE: Libref WEIGHT was successfully assigned as follows:
Engine: V9
Physical Name: /home/u57995729/Weight
81 filename in '/home/u57995729/Weight/weight01.dat';
82 title;footnote;
83 options nodate number; /* Suppress the date and display page numbers in upper right corner. */
84 data weight;
85 infile in;
86 informat day date7.;
87 format day date7. weight 5.2;
88 input day Weight @@;
89 label weight='Weight'
90 day='Date';
91 run;
ERROR: Physical file does not exist, /pbr/biconfig/940/Lev1/SASApp//home/u57995729/Weight/weight01.dat.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.WEIGHT may be incomplete. When this step was stopped there were 0 observations and 2 variables.
WARNING: Data set WORK.WEIGHT was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 670.68k
OS Memory 24228.00k
Timestamp 09/02/2021 10:44:40 PM
Step Count 44 Switch Count 0
Page Faults 0
Page Reclaims 102
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 8
Hi @wmjklein
This is strange...I guess the /pbr/biconfig/940/Lev1/SASApp folder is the SAS configuration folder on your SAS server machine.
I have this before when using a relative filename (i.e., without a full path) and then SAS adds the path of the current working directory to the relative path but in your case you have specified a full path to the file name...looks like something worth investigating with SAS technical support.
In the meantime see this: https://blogs.sas.com/content/sgf/2018/05/18/how-to-change-your-working-directory-for-sas-with-the-d... so maybe , as a temporary workaround, try to change the working directory to "/home/u57995729/Weight" and in the filename statement specify only "weight01.dat"?
Eyal
Please copy the FILENAME statement from your code and paste it directly into a window opened with this button:
Looks like there is some type of null character before the / that you can not see or that did not get copied into the post on this forum.
Re-type the FILENAME statement. In particular the characters from the opening quote to the word home. Make sure the quotes are actually quote characters and not some typesetting character that Microsoft applications have a nasty habit of replace quotes with. (AKS "stupid" quotes.)
filename in '/home/u57995729/Weight/weight01.dat';
SAS is running on a Unix server. On a unix server absolute filenames start with the root node.
Since the filename for your PDF file starts with the letter C the unix operating system will consider that a file relative to the current working directory. Also the character used to indicate directories in Unix is / and not \. The backslash character in your filename is used in Unix to "escape" special characters. Since none of the characters in your filename that follow the backslashes need protection they are not doing anything.
Since the SAS session your SAS/Studio session is connected to was launched with /pbr/biconfig/940/Lev1/SASApp/ as the current directory it will try to create your file named C:DATASASWeightmovingavg01.pdf in that directory. But your account does not have permission to write into that directory.
Create the PDF file in your Unix directory. You can then use the SAS/Studio interface to download it to your PC.
Just as you can't read from your PC drive, you also can't write to it. You must use a path on the On Demand server.
Hi:
@Kurt_Bremser is correct. When you are working in SAS Studio on SAS OnDemand for Academics, SAS cannot read from your C: drive or Mac hard drive and it cannot write to your local machine drives. Any data you want to read must be uploaded into your Files (Home) top folder on the OnDemand server. Any files you want to create must be written to your server folders and then downloaded to your machine after creation. To keep things straight on my OnDemand account, I have made 2 folders underneath the Files (Home) top location. I call them all_data and all_output. Any data I want to read I upload to the all_data folder and any report files, such as RTF, PDF, or HTML files that I want to write I will use ODS statements and write the output to the all_output folder. Here's an example:
In your code, you do NOT refer to Files (Home) -- the server path for that top node is /home/<youruserID> and as you can see in the screen shot, my userID is cynther0, so my top folder's path name is /home/cynther0. If your userID was u12345678, then your top folder's path would be /home/u12345678.
Any subfolders created under the top folder have the subfolder name appended to the top level So, for example, the all_data folder has a path of /home/cynther0/all_data and the all_output folder has a path of /home/cynther0/all_output. And so you can see that the file student_transport.dat in my FILENAME statement has a physical location of /home/cynther0/all_data/student_transport.dat and the PDF file has a specified location of /home/cynther0/all_output/testfile.pdf and both files are visible in my screen shot.
I use a DATA step program to reference the .DAT file in order to read the file and then I use an ODS PDF statement to create a report of all the Transport methods for each student.
The best, never-fail method to find your physical location for reading data or writing output files is to right click on the folder or file name in the Server Files and Folders pane. Then choose Properties from the popup menu. When the Properties window opens, you will find a Location field that shows the full and correct path for you to use.
Another tip is to avoid the use of SASUSER as a library reference on the OnDemand server. Most SAS Studio installations do not permit write access to the SASUSER folder. We recommend in our classes that you put your personal folders directly under the Files (Home) location.
Hope this helps,
Cynthia
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.