Previous Page | Next Page

Creating Summary Tables with the TABULATE Procedure

Input File and SAS Data Set for Examples

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 data 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 data from a new variable named AmountSold, which is created by multiplying Units by Price.

The following program creates the SAS data set that is used in this section:

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. [arrow]

Previous Page | Next Page | Top of Page