Previous Page | Next Page

Producing Detail Reports with the PRINT Procedure

Input File and SAS Data Sets for Examples

The examples in this section use one input file(footnote 1) and five SAS data sets. 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 first of the five SAS data sets 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 five SAS data sets that this section uses:

data year_sales;
   infile 'your-input-file';
   input Month $ Quarter $ SalesRep $14. Type $ Units Price;
   AmountSold = Units * Price;


FOOTNOTE 1:   See the Data Set YEAR_SALES for a complete listing of the input data. [arrow]

Previous Page | Next Page | Top of Page