BookmarkSubscribeRSS Feed
DougZ
Obsidian | Level 7

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;

 

1 REPLY 1
Reeza
Super User

@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. 

 

 

 

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 1137 views
  • 0 likes
  • 2 in conversation