01-23-2017 11:15 PM
I'm getting an error sas cannot write a png file to the disk and it says I don't have acces . I am running this on enterprise and on unix server. I know how to solve this problem based on
ods _all_ close;
ods html path='c:\temp' (url=none) file='sastest.html';
/* Your SAS procedure code goes here */
ods _all_ close;
im running this in macro code. I had to run through this macro multiple times as they are different sets of population. Whenever I run through batch mode the first iteration does not throw out any error but successive iterations will gives above error. But when I run one by one individually I don't see any error
can some one please help,me
01-23-2017 11:48 PM
If you're on a Unix server it's unlikely your server has a C:\temp location and its not likely to have access to your C drive at all.
Talk to your SAS administrators or colleagues regarding what locations you do have access to and where you can save files and then download them to your system.
01-24-2017 08:33 AM
Sorry I was not clear in my message:
I used the following not the one i said earlier ,
ods listing close;
ods html path="%sysfunc(pathname(work))" ;
ods html close;
the actual error
01-24-2017 08:46 AM - edited 01-24-2017 08:47 AM
Please run the following and post the log:
%let path="%sysfunc(pathname(work))" ;
Also, are you running from EG? SAS Studio? Are you using a remote SAS server?
01-24-2017 10:16 AM
Please see the path from log
I am running this on SAS EG and connecting to SAS 9.4 unix server
The / indicates that path is likely on the server and your session likely does not have write permissions there.
01-24-2017 10:50 AM
01-24-2017 11:10 AM
When I run one macro then it doesnot show this error, but when i run the multiple macros in batch then except first one, rest of the macro iteration start giving this error
I might suggest then that at the start of the batch that you get one macro variable for the path:
%let mypath=%sysfunc(pathname(work)) ;
And then use
ODS Html path="&mypath";
There could be something in repeated calls to the function that is changing the actual path value between macros. But multiple macros also implies multiple other places for things to break. You might also try running the batch job with Options MPRINT SYMBOLGEN MLOGIC; and then wade through a lot of log. The log is more likelyt to show which specific lines are causing problems. You may want the MPRINTNEST option if you have macros calling macros and SOURCE2 if using %Include files.
01-24-2017 09:20 AM
Ah, you might want to read this article:
And then before your code put:
ods listing gpath="%sysfunc(getoption(work))";
It seems that HTML needs to save the png somewhere and that is set to something, but either doesn't exist or you don't have access to it.