Return to Homepage

Goto the Tip of the Month Archive

Other interesting pages ...
LinkedIn Profile
SAS Cheat Sheet
Useful SAS Code
Full SAS Example
Basic Statistics
Contact Information

SAS Tip of the Month
August 2018

One thing I like to see is a date in a listing so I can tell how old the output is. One simple way to do this is add this in the title as shown in the following example:

   title "The report was created on %sysfunc(today(),date9.)";
   proc print data=sashelp.class;
   run;

What happens here is that the %SYSFUNC funtion runs the code inside the funtion call, getting the date from the TODAY function and formatting it using a DATE9 format. Why is this useful you may ask, after all by default the date and time of run is in the top right hand corner of the listing? Answer to that is "Yes it is, but if you have the NODATE option running, as many do when creating output, the date and time of run will not appear."

The %SYSFUNC function is useful in so many other ways that it may appear in future months with other examples.

Hope this is useful. See you next month.

________________________________
Updated August 2, 2018