As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Tip of the Day:July 9

From sasCommunity
Jump to: navigation, search

sasCommunity Tip of the Day

Some little known PROC REPORT options can be used to automatically generate the column and define statements for an easily customizable PROC REPORT.

PROC REPORT data=sashelp.class nowd list;
run;

will produce something like the following in the log:

PROC REPORT DATA=SASHELP.CLASS LS=171 PS=58 SPLIT="/" CENTER ;
COLUMN Name Sex Age Height Weight ;
DEFINE Name / DISPLAY FORMAT= $8. WIDTH=8 SPACING=2 LEFT "Name" ;
DEFINE Sex / DISPLAY FORMAT= $1. WIDTH=1 SPACING=2 LEFT "Sex" ;
DEFINE Age / SUM FORMAT= BEST9. WIDTH=9 SPACING=2 RIGHT "Age" ;
DEFINE Height / SUM FORMAT= BEST9. WIDTH=9 SPACING=2 RIGHT "Height" ;
DEFINE Weight / SUM FORMAT= BEST9. WIDTH=9 SPACING=2 RIGHT "Weight" ;
RUN;

Note: This tip was provided by Roger DeAngelis in a SAS-L post:

...read more

Submitted By Art T



Feel free to comment on this tip.


Prior tip - Next tip - Random Tip

Submit a Tip