DataLoader/MX Reference Manual (G06.24+)
Creating a Customized Version of DataLoader/MX
DataLoader/MX Reference Manual—525872-002
5-31
Generating Test Data
unique first name, last name combinations. If this is enough, you can eliminate the
middle name column.
If you need more names, you could make the middle column represent a middle initial,
with one of 26 unique values. This step raises the number of unique combinations to
73,918,338 (421 * 26 * 6,753). If this is not enough, you can duplicate the last name
field in the middle name field, giving 6,753 middle names and 19,198,866,788 (421 *
6,753 * 6,753) unique combinations. In addition, you could add first or last names or
even add a title column to the field.
DataLoader/MX has two utility procedures to support Cartesian fields:
•
DTLCartAddCol enables you specify how many columns are in a given Cartesian
field, the order of the columns, and the file that contains the list of values that each
column can take on. Call DTLCartAddCol once for each column in each field. Call
it from the INITIALIZE1 or INITIALIZE2 user exits.
•
DTLCartGenerateField returns the next combination of values for the specified
field. Call it from GETNEXTRECORD.
DataLoader/MX includes a number of data files you can use with Cartesian field
procedures. The file data/aaaindex in the DataLoader/MX directory contains a short
description of each data file. You are not limited to using data files included with
DataLoader/MX. You can use data files you create yourself.
Use Cartesian fields to control the distribution of values in a field. Suppose that you
have a field that should contain the letter X 50 percent of the time, the letter Y
40 percent of the time, and the letter Z 10 percent of the time. Of the different ways to
achieve this, an easy way is to use a single Cartesian field with one column.
Associated with the column is a file that contains 50 percent Xs, 40 percent Ys, and 10
percent Zs.
DTLCartAddCol
This procedure adds a column to a Cartesian field.
The syntax is:
Field
is a value from 1 through 10 that specifies the field to which the column is to be
added.
Name
is the name of a file that contains the values the column will contain, with one value
per record.
void DTLCartAddCol( short Field, char* Name, short Shuffle );