* Read the raw data; DATA flowersales; INFILE 'd:\MySASLib\TropicalSales.dat'; INPUT CustomerID $4. @6 SaleDate MMDDYY10. @17 Variety $9. Quantity; PROC SORT DATA = flowersales; BY DESCENDING Quantity; * Find biggest order and pass the customer id to a macro variable; DATA _NULL_; SET flowersales; IF _N_ = 1 THEN CALL SYMPUT("selectedcustomer",CustomerID); ELSE STOP; PROC PRINT DATA = flowersales; WHERE CustomerID = "&selectedcustomer"; TITLE "Customer &selectedcustomer Had the Single Largest Order"; RUN;