Creating Detail and Summary Reports with the REPORT Procedure |
The examples in this section use one input file(footnote 1) and one SAS data set. The input file contains sales records for a company, TruBlend Coffee Makers, that distributes the coffee machines. The file has the following structure:
01 1 Hollingsworth Deluxe 260 49.50 01 1 Garcia Standard 41 30.97 01 1 Hollingsworth Deluxe 330 49.50 01 1 Jensen Standard 1110 30.97 01 1 Garcia Standard 715 30.97 01 1 Jensen Deluxe 675 49.50 02 1 Jensen Standard 45 30.97 02 1 Garcia Deluxe 10 49.50 ...more data lines... 12 4 Hollingsworth Deluxe 125 49.50 12 4 Jensen Standard 1254 30.97 12 4 Hollingsworth Deluxe 175 49.50
The input file contains the following values from left to right:
The SAS data set is named YEAR_SALES. This data set contains all the sales data from the input file and a new variable named AmountSold, which is created by multiplying Units by Price.
The following program creates the SAS data set that this section uses:
data year_sales; infile 'your-input-file'; input Month $ Quarter $ SalesRep $14. Type $ Units Price; AmountSold = Units * Price; run;
FOOTNOTE 1: See the Data Set YEAR_SALES for a complete listing of the input data.
Copyright © 2012 by SAS Institute Inc., Cary, NC, USA. All rights reserved.