Tradewinds Travel needs
to know how much business the company did with various tour vendors
during the peak season. The data that the company wants to look at
is the total number of people that are scheduled on tours with various
vendors. It also wants to look at the total value of the tours that
are scheduled.
The following external
file contains data about Tradewinds Travel tours:
1
2
3
4
----------------------------
Germany 1150 Express 10
Spain 1020 World 12
Brazil 1080 World 6
India 978 Express .
Japan 1440 Express 10
Greece 1396 Express 20
New Zealand 2978 Southsea 6
Venezuela 850 World 8
Italy 936 Express 9
Russia 1848 World 6
Switzerland 1468 World 20
Australia 2158 Southsea 10
Ireland 1116 Express 9
The following list describes the fields in the input file:
1 |
provides
the name of the destination country for the tour
|
2 |
specifies
the cost of the land package in U.S. dollars
|
3 |
specifies
the name of the trip vendor
|
4 |
specifies
the number of people that were booked on that tour
|
The first step is to
create a permanent SAS data set. The following program creates the
data set MYLIB.TOURREVENUE:
libname mylib 'SAS-library';
data mylib.tourrevenue;
infile 'input-file' truncover;
input Country $ 1-11 LandCost Vendor $ NumberOfBookings;
run;
proc print data=mylib.tourrevenue;
title 'SAS Data Set MYLIB.TOURREVENUE';
run;
The PROC PRINT statement
that follows the DATA step produces this display of the MYLIB.TOURREVENUE
data set.
Display 13.1 Data Set MYLIB.TOURREVENUE
Each observation in
the data set MYLIB.TOURREVENUE contains the cost of a tour and the
number of people who booked that tour. The tasks of Tradewinds Travel
are as follows:
-
to determine how much money was
spent with each vendor and with all vendors together
-
to store the totals in a SAS data
set that is separate from the individual vendors' records
-
to find the tour that produced
the most revenue, which is determined by the land cost times the number
of people who booked the tour