* Macro to print 5 largest sales; %MACRO sample; PROC SORT DATA = flowersales; BY DESCENDING Quantity; PROC PRINT DATA = flowersales (OBS = 5); FORMAT SaleDate WORDDATE18.; TITLE 'Five Largest Sales'; %MEND sample; * Read the flower sales data; DATA flowersales; INFILE 'd:\MyRawData\TropicalSales.dat'; INPUT CustomerID $ @6 SaleDate MMDDYY10. @17 Variety $9. Quantity; RUN; * Invoke the macro; %sample RUN;