I have the following code in an autoexec.
*ODS STATEMENTS RESET; options mrecall; %macro odsReset; ods path reset; ods _ALL_ close; ods trace on; ods noptitle; ods graphics on; ods listing; %mend odsReset; %odsReset; *ODS GRAPHICS; *The default location is the current directory for the SAS program that generated the graphic image; %let sasworklocation="%trim(%sysfunc(pathname(work)))"; ods listing gpath=&sasworklocation;
The past day I am getting an error message concerning disk permissions I don't understand. Please see attached file. Can you help?
Either your autoexec has been circumvented, or overridden by later code. Run these statements as part of your output code:
%let sasworklocation="%trim(%sysfunc(pathname(work)))";
ods listing gpath=&sasworklocation
If you use other ODS destinations, make sure that the same path is used.
Keep in mind that using the WORK location means that the images will vanish once you end your SAS session.
Thank you for the reply. I found that the following code works for different procedures. I have to include it immediately before the plot code.
ods listing gpath = '/home/u... /Stat.XXX.graphs';
ods graphics on / imagename ="DiagnosticsPanel" imagefmt=tiff;
I like each graph to have a name I chose. Am I doing it correctly?
Either your autoexec has been circumvented, or overridden by later code. Run these statements as part of your output code:
%let sasworklocation="%trim(%sysfunc(pathname(work)))";
ods listing gpath=&sasworklocation
If you use other ODS destinations, make sure that the same path is used.
Keep in mind that using the WORK location means that the images will vanish once you end your SAS session.
And please do always (as in ALWAYS) post your log by copy/pasting it into a window opened with this button:
Having to repeatedly switch between the pdf previewer and the main post while composing an answer is a PITA. And we can't copy/paste log excerpts from a picture.
And to give you some technical background:
Whenever you let SAS create something without an explicit absolute path, the SAS session will try to put that in its current working directory, which is the location of the script that started SAS on the backend (or a location set within that script). This location is (in server-based SAS setups) within the SAS configuration tree, where only the SAS installation user (or the superuser, as you are on UNIX) have write permission.
An absolute path starts at the root of the filesystem (/ in UNIX, or a drive letter/backslash or UNC location in Windows). SAS On Demand allows the use of the tilde (~) as an absolute path to your home directory; you could also use $HOME for that.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.