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. 

 

 

 

 

sas-innovate-2024.png

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.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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