Data visualization with SAS programming

ODS HTML output has new Proc Print results but on older SGPLOT

Reply
Contributor
Posts: 20

ODS HTML output has new Proc Print results but on older SGPLOT

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;

 

Highlighted
Super User
Posts: 23,259

Re: ODS HTML output has new Proc Print results but on older SGPLOT

[ Edited ]

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

 

 

 

 

Ask a Question
Discussion stats
  • 1 reply
  • 69 views
  • 0 likes
  • 2 in conversation