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

Hi,

 

Failed to create PDF file in my local drive, even after using ODS statement. Please make use of the below program.

 

Also, Please explain why we are not using "run" statement after ods pd close?

data construction;
input Items $ Qty Rate instock sold;
cards;
Bricks 1 35 1485 2453
Paint  1 45 1487 2658
Lader  1 75 1224 2014
Hammer 1 50 1789 2369
Nail   1 5  1258 458
;
run;
proc print data= construction;
run;
ods pdf file= "T:\SAS\ODS statement\construction.pdf";
title="Purchase_list";
proc print data= construction;
run;
ods pdf close;

LOG:

1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 NOTE: ODS statements in the SAS Studio environment may disable some output features.
 73         
 74         data construction;
 75         input Items $ Qty Rate instock sold;
 76         cards;
 
 NOTE: The data set WORK.CONSTRUCTION has 5 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 
 82         ;
 83         run;
 84         proc print data= construction;
 85         run;
 
 NOTE: There were 5 observations read from the data set WORK.CONSTRUCTION.
 NOTE: PROCEDURE PRINT used (Total process time):
       real time           0.08 seconds
       cpu time            0.07 seconds
       
 
 86         ods pdf file= "T:\SAS\ODS statement\construction.pdf";
 NOTE: Writing ODS PDF output to DISK destination "/opt/sasinside/SASConfig/Lev1/SASApp/T:\SAS\ODS statement\construction.pdf", 
       printer "PDF".
 87         title="Purchase_list";
            _____
            180
 
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 
 88         proc print data= construction;
 89         run;
 
 NOTE: There were 5 observations read from the data set WORK.CONSTRUCTION.
 NOTE: PROCEDURE PRINT used (Total process time):
       real time           0.06 seconds
       cpu time            0.05 seconds
       
 
 90         ods pdf close;
 ERROR: Insufficient authorization to access /opt/sasinside/SASConfig/Lev1/SASApp/T:\SAS\ODS statement\construction.pdf.
 91         
 92         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 105        

 Many thanks,

Deepak.

1 ACCEPTED SOLUTION

Accepted Solutions
Deepak13
Obsidian | Level 7

Hi Anushree,

 

Many thanks for your advice, I have removed the "=" in title and changed the ods file path to UE server, Now the program works fine with no errors!

 

Regards,

Deepak.

View solution in original post

6 REPLIES 6
SASKiwi
PROC Star

From the error message it looks like your SAS program is running on a remote SAS server with the Unix operating system. As such it know nothing about Windows file paths on your local PC. Ask your SAS admin to advise you where you can write your files on the server preferably so they can be shared with your PC.

Deepak13
Obsidian | Level 7

Got the point, I use UE for practice, So this is a cloud service which is not related to my windows drive, Now I changed the path by creating a folder in the UE itself and the program works fine! Many thanks for your prompt support!

data construction;
input Items $ Qty Rate instock sold;
cards;
Bricks 1 35 1485 2453
Paint  1 45 1487 2658
Lader  1 75 1224 2014
Hammer 1 50 1789 2369
Nail   1 5  1258 458
;
run;
proc print data= construction;
run;
ods pdf file= "/folders/myshortcuts/Myfolders/ODS statement/construction.pdf";
title"Purchase_list";
proc print data= construction;
run;
ods pdf close;
Reeza
Super User
It looks like you didn't quite set up SAS UE correctly, the default path should be folders/myfolders but yours is Myfolders - I think the capital M throws it off. In general, you can set up any shared folder though and then you'll have the path similar to above.
anushreebiotech
Obsidian | Level 7

Hi,

 

1. There is a problem with your Title statement. It shouldn't have = sign.

2. Secondly, I think you need to check your path where you want the output.  I used your code with these changes, and its working perfectly fine for me.

3. ODS statement is a global statement. That's why we don't have to use run after that.

 

data construction;
input Items $ Qty Rate instock sold;
cards;
Bricks 1 35 1485 2453
Paint 1 45 1487 2658
Lader 1 75 1224 2014
Hammer 1 50 1789 2369
Nail 1 5 1258 458
;
run;
proc print data= construction;
run;
ods pdf file= "/home/anushreebiotech0/ECRB94/data/construction.pdf";
title "Purchase_list";
proc print data= construction;
run;
ods pdf close;

 

 

Regards,

Anushree

Deepak13
Obsidian | Level 7

Hi Anushree,

 

Many thanks for your advice, I have removed the "=" in title and changed the ods file path to UE server, Now the program works fine with no errors!

 

Regards,

Deepak.

VDD
Ammonite | Level 13 VDD
Ammonite | Level 13

@Deepak13 Please mark the solution that solved your issue in-order to close the thread.

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 2207 views
  • 0 likes
  • 5 in conversation