I'm running on Linux 64, 9.4 (TS1M3). I can produce an SGPLOT vbar chart and do a Proc Print of a Proc Means... but the output for the SGPLOt is an hour older than that of the Print. See attachment. Can't find anything on this in the SAS documentation. I really don't understand ODS and am just copying things that I've seen others do.
ODS HTML PATH = "&outdir/" (url=none);
**ods graphics /imagemap=on;
ods html file="&report_file..html";
title "BRI Jobs Linux Space - &Server, %sysfunc(today(),weekdate3. -r)%str(,) %sysfunc(today(),worddate15. -l) %sysfunc(time(),tod5. -l)";
footnote h=3pt "%sysfunc(getoption(sysin)), &sysmacroname";
proc means data=work.bri_space_report nway noprint;
class user;
var SizeMB;
output out=work.bri_space_sums sum(SizeMB)=;
run;
*****************************************************;
* Generate the vertical bar plot by user;
*****************************************************;
proc sgplot data=work.bri_space_sums;
vbar user / response=sizeMB;
run;
proc sort data=work.bri_space_sums;
by descending SizeMB;
run;
proc print data=work.bri_space_sums noobs;
format _numeric_ comma10.;
var user _freq_ sizemb;
run;
@DougZ wrote:
I'm running on Linux 64, 9.4 (TS1M3). I can produce an SGPLOT vbar chart and do a Proc Print of a Proc Means... but the output for the SGPLOt is an hour older than that of the Print. See attachment. Can't find anything on this in the SAS documentation. I really don't understand ODS and am just copying things that I've seen others do.
ODS HTML PATH = "&outdir/" (url=none); **ods graphics /imagemap=on; ods html file="&report_file..html"; title "BRI Jobs Linux Space - &Server, %sysfunc(today(),weekdate3. -r)%str(,) %sysfunc(today(),worddate15. -l) %sysfunc(time(),tod5. -l)"; footnote h=3pt "%sysfunc(getoption(sysin)), &sysmacroname"; proc means data=work.bri_space_report nway noprint; class user; var SizeMB; output out=work.bri_space_sums sum(SizeMB)=; run; *****************************************************; * Generate the vertical bar plot by user; *****************************************************; proc sgplot data=work.bri_space_sums; vbar user / response=sizeMB; run; proc sort data=work.bri_space_sums; by descending SizeMB; run; proc print data=work.bri_space_sums noobs; format _numeric_ comma10.; var user _freq_ sizemb; run;
All output goes to the destination until you close it. Destinations with specific file references are usually used to create reports you need saved or shared, not for development process.
You can search on lexjansen.com for basic tutorials on ODS.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: