Data Transformation Engine Design Studio Tutorial

Chapter 8 - Using the CHOOSE Function Scenario
Design Studio Tutorial
173
Copies of the files created during the exercises are provided for all chapters in the
Tutorials\Solutions folder. The structure and use of these files is described in
the Design Studio Tutorial Solutions section on page 18.
Scenario
You have the results of a raffle drawing.
The winners.txt file lists the winners in the raffle. The first person in the file won
first place, the second person won second place, and so on.
The winners.txt file lists the winners in order; Helen is the first prizewinner,
Florence is second, and so on:
Helen
Florence
Karen
Glenn
Betty
Robert
Toby
The prizes.txt file lists the raffle prizes and the place a winner must achieve in
order to receive that prize.
Here is the prizes.txt file:
Hot tub, 4
Couch, 6
Stereo, 3
Dog bone, 7
House, 1
Set of luggage, 5
Car, 2
You need to generate a file that notifies each winner of his or her prize, and have
the output file appear like this:
Congratulations,
prizewinner
1! You have won PRIZE
X
.
Congratulations,
prizewinner
2! You have won a PRIZE
Y
.
Generating the Congratulations Message File
Use the CHOOSE function to select an object at a given index in a series.