I am using SGPLOT and would like those plots saved to a specific folder on my Macbook as JPEGS with a new file name. The code I used for SAS University Edition worked:
(towards the beginning)
ODS graphics on / reset imagename="new file name" imagefmt =jpeg;
ODS listing gpath = "/folders/myfolders/2020/NCSTB/OUTPUT/dest folder/";
Run;
(at the end)
ods rtf close;
run;
This is not working with SAS On Demand for Academics.
The code generates the plots but I get this error message:
It seems to work for me. Start from this example and see what you add that makes your code fail.
ods graphics on / reset imagename="new file name" imagefmt =jpeg;
ods listing gpath = '%temp%';
proc sgplot data=sashelp.class;
scatter x=WEIGHT y=HEIGHT;
run;
NOTE: Listing image output written to %temp%\new file name1.jpeg.
Directory of C:\Users\M771879.CORPNZ\AppData\Local\Temp
26/07/2021 02:45 p.m. 18,072 new file name1.jpeg
Thanks for the code but that did not work. What other ways can I save the graphs as jpegs?
In SAS University Edition, I was able to save to a folder on my MacBook that was backed up to iCloud.
Thanks - I got it.
SAS ODA can't write files to your local computer.
He's writing to a Unix path, so I assume he's writing to an ODA path.
This path /pbr/biconfig/940/Lev1/SASApp is a no-no though as it's the SAS system path.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.