BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
lsimek
Calcite | Level 5

The following code:

options printerpath=png nodate papersize=('5.75in','4.75in');
ods _all_ close;
ods printer file="/home/u64055593/sasuser.v94/projekt/_tablica.png";
proc sgrender data=rez;run;
ods printer close;
ods listing;

 

which is trying to copy the code given here

and is following the instructions given in similar thread here

produces the error: ERROR: Cannot write image to /pbr/biconfig/940/Lev1/SASApp/SGPlot2.png. Please ensure that proper disk permissions are set.

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

You need to tell ODS what DIRECTORY to use, not just what FILE to write.  Otherwise it tries to write the file to the CURRENT WORKING DIRECTORY, which in your case is not writable by you.

 

Either tell ODS what path.

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatug/p0cmojsdkiab8cn1k2qk3rp3a8s0.htm

 

Or try changing the current directory to a place where it can write.

https://documentation.sas.com/doc/en/pgmmvacdc/9.4/lefunctionsref/p1cjn9slqm22q7n1exa9ba8ydjce.htm

 

View solution in original post

2 REPLIES 2
Tom
Super User Tom
Super User

You need to tell ODS what DIRECTORY to use, not just what FILE to write.  Otherwise it tries to write the file to the CURRENT WORKING DIRECTORY, which in your case is not writable by you.

 

Either tell ODS what path.

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatug/p0cmojsdkiab8cn1k2qk3rp3a8s0.htm

 

Or try changing the current directory to a place where it can write.

https://documentation.sas.com/doc/en/pgmmvacdc/9.4/lefunctionsref/p1cjn9slqm22q7n1exa9ba8ydjce.htm

 

lsimek
Calcite | Level 5

Thank you, the answer is right. Adding ods listing gpath='/home/u64055593/sasuser.v94/projekt/'; will solve the problem.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 407 views
  • 0 likes
  • 2 in conversation