DataLoader/MX Reference Manual (H06.03+, J06.03+)

Creating a Customized Version of DataLoader/MX
DataLoader/MX Reference Manual543544-001
5-32
Generating Test Data
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.
Shuffle
is a flag that indicates whether the contents of Name are to be returned in a
randomized way by DTLCartGenerateField or whether they are to be returned in
the order they are in the file. A nonzero value causes them to be returned in a
randomized way. This strategy is useful because, although it is much easier to
maintain files with lists when the lists are in some order, you would not usually want
that order to be carried over into the test data.
There can be a maximum of 10 Cartesian fields, and each Cartesian field can have a
maximum of 10 columns.
DTLCARTADDCOLCOB
This procedure adds a column to a Cartesian field. It can be called from COBOL
programs.
The syntax is:
void DTLCartAddCol( short Field, char* Name, short Shuffle );
void DTLCARTADDCOL(short Field, char* Name, short Len,
short Shuffle );