Dataloader/MP Reference Manual

Table Of Contents
Creating a Customized Version of DataLoader/MP
DataLoader/MP Reference Manual424148-003
5-30
Generating Test Data
Non-alphanumeric 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 for this procedure follows:
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 Len parameter provides the length of parameter
Odometer. The syntax for this procedure follows:
Cartesian Fields
The most powerful mechanism for generating test data with DataLoader/MP is the use
of Cartesian fields. A Cartesian field is a group of one or more columns, each of which
has its own list of possible values. When asked 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 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/MP 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 DataLoader/MP’s list of last names, which
has 6,753 unique entries. Using that list, you have 2,843,013 (421 * 6,753) unique first
name, last name combinations. If this is enough, you can eliminate the middle name
column.
long DTLIncOdometer( char* Odometer );
long DTLINCODOMETERCOB( char* Odometer, short Len );