BookmarkSubscribeRSS Feed
wmjklein
Calcite | Level 5

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

8 REPLIES 8
EyalGonen
Lapis Lazuli | Level 10

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

Tom
Super User Tom
Super User

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';

 

wmjklein
Calcite | Level 5
Site:    SAS on Demand SAS Studio
Product:    ODS in SAS Studio

Please tell me the correct ODS syntax for the destination of a pdf file
in the SAS Studio using Windows 10. Excerpts from the log are shown
below. The faulty syntax occurs at line 182 of the log and the error
message occurs at line 204 of the log.

Thank you.



 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 NOTE: ODS statements in the SAS Studio environment may disable some
output features.
 69
 70 /*===============================================================+
 71         |
c:\sys\sas\weight\movingaverage02.sas                          |
 72         | March 15,
2019                                                 |
 73 +===============================================================*/
 74 /*==================================================================+
 75         |
|5                                                                |
 76         | Initial
input.                                                    |
 77 +==================================================================*/
 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;

 NOTE: The infile IN is:
       Filename=/home/u57995729/Weight/weight01.dat,
       Owner Name=u57995729,Group Name=oda,
       Access Permission=-rw-r--r--,
       Last Modified=20Jul2021:12:22:52,
       File Size (bytes)=20635

 NOTE: 209 records were read from the infile IN.


 ---------------------  Several lines imitted-------------------


 173
 174 /*===============================================================+
 175 ||60                                                             |
 176        |Set up the pdf
file.                                            |
 177 +================================================================*/
 178        options orientation=landscape;
 179        ods _all_ close;
 180        ods escapechar='^';
 181        ods noresults noproctitle;
 182        ods pdf file="C:\DATA\SAS\Weight\movingavg01.pdf"
 183                      startpage=no;            /* No page breaks */
 NOTE: Writing ODS PDF output to DISK destination
"/pbr/biconfig/940/Lev1/SASApp/C:\DATA\SAS\Weight\movingavg01.pdf",
printer "PDF".
 184                                               /* style=styles.test
notoc; No table of contents */
 185                                   /*style=bottompageno;*/
 186        legend1 label=none
 187                position=(top center inside)
 188                mode=share;
 189        axis1 color=black;
 190        axis2 order=('01jan06'd to "&endday"d by month2)
value=(font=arial h=7pt) /* label=none */ ;
 191        symbol1 interpol=join width=2 colour=red;
 192        symbol2 interpol=join width=2 color=blue;
 193        title1 f=Times j=l "Last day is &lastday";
 194
 195        proc gplot data=weight;
 196          plot weight*day
 197               avg*day
 198              /overlay legend
 199               vaxis=axis1
 200               haxis=axis2;
 201          format day monyy5. weight 7.;
 202        run;

 WARNING: The intervals on the axis labeled "Date" are not evenly spaced.
 WARNING: Font ARIAL could not be used.
          Font Albany AMT substituted for font ARIAL.
 WARNING: No minor tick marks will be drawn because major tick
increments have been specified in uneven or unordered intervals.
 NOTE: The axis frame outline was drawn in BLACK as specified on the
left vertical axis. Any other axis line colors were ignored.
 NOTE: 5 observation(s) outside the axis range for the weight * day
request.
 NOTE: 49 observation(s) contained a MISSING value for the avg * day
request.
 NOTE: 4 observation(s) outside the axis range for the avg * day request.
 203        quit;

 NOTE: There were 1459 observations read from the data set WORK.WEIGHT.
 NOTE: PROCEDURE GPLOT used (Total process time):
       real time           0.07 seconds
       user cpu time       0.07 seconds
       ---------------------------   Several lines omitted
---------------------
       Block Output Operations           168


 204        ods pdf close;
 ERROR: Insufficient authorization to access
/pbr/biconfig/940/Lev1/SASApp/C:\DATA\SAS\Weight\movingavg01.pdf.
 205
 206
 207        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 217
Tom
Super User Tom
Super User

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.

wmjklein
Calcite | Level 5
Site:    SAS on Demand SAS Studio
Product:    ODS in SAS Studio

Please tell me the correct ODS syntax for the destination of a pdf file
in the SAS Studio using Windows 10. Excerpts from the log are shown
below. The faulty syntax occurs at line 182 of the log and the error
message occurs at line 204 of the log.

Thank you.



 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 NOTE: ODS statements in the SAS Studio environment may disable some
output features.
 69
 70 /*===============================================================+
 71         |
c:\sys\sas\weight\movingaverage02.sas                          |
 72         | March 15,
2019                                                 |
 73 +===============================================================*/
 74 /*==================================================================+
 75         |
|5                                                                |
 76         | Initial
input.                                                    |
 77 +==================================================================*/
 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;

 NOTE: The infile IN is:
       Filename=/home/u57995729/Weight/weight01.dat,
       Owner Name=u57995729,Group Name=oda,
       Access Permission=-rw-r--r--,
       Last Modified=20Jul2021:12:22:52,
       File Size (bytes)=20635

 NOTE: 209 records were read from the infile IN.


 ---------------------  Several lines imitted-------------------


 173
 174 /*===============================================================+
 175 ||60                                                             |
 176        |Set up the pdf
file.                                            |
 177 +================================================================*/
 178        options orientation=landscape;
 179        ods _all_ close;
 180        ods escapechar='^';
 181        ods noresults noproctitle;
 182        ods pdf file="C:\DATA\SAS\Weight\movingavg01.pdf"
 183                      startpage=no;            /* No page breaks */
 NOTE: Writing ODS PDF output to DISK destination
"/pbr/biconfig/940/Lev1/SASApp/C:\DATA\SAS\Weight\movingavg01.pdf",
printer "PDF".
 184                                               /* style=styles.test
notoc; No table of contents */
 185                                   /*style=bottompageno;*/
 186        legend1 label=none
 187                position=(top center inside)
 188                mode=share;
 189        axis1 color=black;
 190        axis2 order=('01jan06'd to "&endday"d by month2)
value=(font=arial h=7pt) /* label=none */ ;
 191        symbol1 interpol=join width=2 colour=red;
 192        symbol2 interpol=join width=2 color=blue;
 193        title1 f=Times j=l "Last day is &lastday";
 194
 195        proc gplot data=weight;
 196          plot weight*day
 197               avg*day
 198              /overlay legend
 199               vaxis=axis1
 200               haxis=axis2;
 201          format day monyy5. weight 7.;
 202        run;

 WARNING: The intervals on the axis labeled "Date" are not evenly spaced.
 WARNING: Font ARIAL could not be used.
          Font Albany AMT substituted for font ARIAL.
 WARNING: No minor tick marks will be drawn because major tick
increments have been specified in uneven or unordered intervals.
 NOTE: The axis frame outline was drawn in BLACK as specified on the
left vertical axis. Any other axis line colors were ignored.
 NOTE: 5 observation(s) outside the axis range for the weight * day
request.
 NOTE: 49 observation(s) contained a MISSING value for the avg * day
request.
 NOTE: 4 observation(s) outside the axis range for the avg * day request.
 203        quit;

 NOTE: There were 1459 observations read from the data set WORK.WEIGHT.
 NOTE: PROCEDURE GPLOT used (Total process time):
       real time           0.07 seconds
       user cpu time       0.07 seconds
       ---------------------------   Several lines omitted
---------------------
       Block Output Operations           168


 204        ods pdf close;
 ERROR: Insufficient authorization to access
/pbr/biconfig/940/Lev1/SASApp/C:\DATA\SAS\Weight\movingavg01.pdf.
 205
 206
 207        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 217
Cynthia_sas
SAS Super FREQ

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:

Cynthia_sas_0-1638381846835.png

  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

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
SAS Enterprise Guide vs. SAS Studio

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.

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
  • 8 replies
  • 847 views
  • 0 likes
  • 5 in conversation