Features: |
COLUMN statement: with aliases COMPUTE statement arguments: AFTER
|
Other features: |
automatic macro variables: SYSDATE |
Data set: | GROCERY |
Formats: | $MGRFMT |
libname proclib
'SAS-library';
options fmtsearch=(proclib);
proc report data=grocery nowd headline headskip;
column manager department sales sales=salesmin sales=salesmax;
define manager / order order=formatted format=$mgrfmt. 'Manager'; define department / order order=internal format=$deptfmt. 'Department';
define sales / analysis sum format=dollar7.2 'Sales';
define salesmin / analysis min noprint; define salesmax / analysis max noprint;
compute after; line ' '; line @7 53*'-';
line @7 '| Departmental sales ranged from' salesmin dollar7.2 +1 'to' +1 salesmax dollar7.2 '. |'; line @7 53*'-'; endcomp;
where sector='se';
title 'Sales for the Southeast Sector'; title2 "for &sysdate"; run;
define manager / order order=formatted format=$mgrfmt. 'Manager'; define department / order order=internal format=$deptfmt. 'Department';
line @7 '| Departmental sales ranged from' salesmin dollar7.2 +1 'to' +1 salesmax dollar7.2 '. |'; line @7 53*'-'; endcomp;