DataLoader/MX Reference Manual (G06.24+)

Creating a Customized Version of DataLoader/MX
DataLoader/MX Reference Manual525872-002
5-30
Generating Test Data
Nonalphanumeric characters in the odometer value are not incremented:
(000)000-0000
(000)000-0001
(000)000-0002
...
(999)999-9999
(000)000-0000
DTLIncOdometer
This procedure increments the odometer pointed to by Odometer.
The syntax is:
This Odometer must be a null-terminated character string.
This procedure returns a value of 0 if the odometer has reached its maximum value
and DTLIncOdometer has started to return duplicate combinations. A nonzero value
indicates that the result is not a repeat of the first combination.
DTLINCODOMETERCOB
This procedure can be called from a COBOL program. It is the same as the
DTLIncOdometer, except that the Len parameter provides the length of parameter
Odometer.
The syntax is:
Cartesian Fields
A powerful mechanism for generating test data with DataLoader/MX, a Cartesian field
is a group of one or more columns, each of which has its own list of possible values.
When directed to generate the next set of values in a Cartesian field, the
DTLCartGenerateField procedure returns the next Cartesian product of the values of
the individual columns.
For example, suppose that you want to generate a set of female names. To generate
millions of them, each unique, you cannot simply create a list. Instead, you use a
Cartesian field with three columns in it. The first column is the first name, the second
column is the middle name, and the last column is the last name.
Next, collect as many female first names as possible. DataLoader/MX includes a
number of lists of sample data. Its list of female first names has 421 unique entries.
Then generate a list of last names or use the DataLoader/MX’s list of last names,
which has 6,753 unique entries. Using that list, you have 2,843,013 (421 * 6,753)
long DTLIncOdometer( char* Odometer );
long DTLINCODOMETERCOB( char* Odometer, short Len );