Dataloader/MP Reference Manual

Table Of Contents
Creating a Customized Version of DataLoader/MP
DataLoader/MP Reference Manual424148-003
5-27
Generating Test Data
Generating Test Data
DataLoader/MP is useful not only for loading data from an existing system, but also for
creating test data. DataLoader/MP has several utility procedures that help create test
data. There are three requirements for test data:
You must be able to generate data in quantities equal to the quantity of real data.
You must be able to control the distribution of data so that it will be representative
of real data, or at least what you believe real data will look like.
The data values themselves must have some resemblance to real data. For
example, a name field containing the following test data might provide the bulk and
maybe even the distribution needed, but does not resemble actual data:
AAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAB
AAAAAAAAAAAAAAAAAAAAAAAAC
...
ZZZZZZZZZZZZZZZZZZZZZZZZZ
Reports designed with this data would look very different when generated with real
data. A client tool looks and operates differently when used with nonrepresentative
data.
To use DataLoader/MP to create test data, replace the default GETNEXTRECORD
user exit with one that generates data, using some of the procedures below. This
GETNEXTRECORD will build a record consisting of fields that each have one type of
test data. Each of the fields of this test data is likely to be of one of the following types:
Constants
Random numbers
Odometers
Cartesian fields
Constants
Some data fields might need to have constant values. All programming languages
support constants, so DataLoader/MP does not provide utility procedures to support
constants.
Random Numbers
No computerized method exists to generate truly random numbers. What is generated
is more properly known as a pseudo-random number series, which is a series of
numbers that looks random but ultimately repeats and has a very obscure pattern.
Not only do pseudo-random numbers repeat patterns, but each one is predictable
given the previous one and the algorithm being used to generate them. If a high-quality
pseudo-random number generating mechanism is chosen, such pseudo-random
numbers are almost always acceptable and are preferable to true random numbers