Dataloader/MP Reference Manual
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introduction to DataLoader/MP
- 2 DataLoader/MP Components
- 3 Running DataLoader/MP
- 4 Specifying File-Related Options for DataLoader/MP
- 5 Creating a Customized Version of DataLoader/MP
- User Exits
- User Exit Descriptions
- BUILDKEY
- CHECKARG
- CONVERTIT
- DELETEIT
- DONEWITHTRANSACTION
- EXITSDESCRIPTION
- GETNEXTRECORD
- INITIALIZE1
- INITIALIZE2
- INSERTIT
- INSTRUCTIONS
- MISC1, MISC2, MISC3, and MISC4
- NEWTRANSACTION
- NEXTINDIRECTFILE
- SKIPPING
- STATISTICSTIME
- TERMINATING
- T0330U00_DEFAULTEXITS_C
- T0330U00-DEFAULTEXITS-COBOL
- T7900D41_DEFAULTEXITS_C
- T7900V00-DEFAULTEXITS-COBOL
- UPDATEIT
- Default User Exits
- DataLoader/MP Library
- The MAKE Routine for NM DataLoader/MP
- The MAKE Routine for Nonnative Mode DataLoader/MP
- 6 DataLoader/MP Examples
- 7 Recovery Strategies
- A Error and Warning Messages
- B Processing Flowcharts
- C C-Only Error Functions
- Index

Creating a Customized Version of DataLoader/MP
DataLoader/MP Reference Manual—424148-003
5-28
Generating Test Data
because of their repeatability. From now on, the word “random” will be used to mean
pseudo-random.
DataLoader/MP provides two random-number-generating procedures. Each call to
either procedure returns a random unsigned 32-bit number. Values are evenly
distributed over the range of an unsigned 32-bit number (0 through 4,294,967,295).
The two procedures differ in the number of values they return before repeating (known
as the period.)
The results of a call to either procedure are directly usable as is, but it is more typical
to want to generate a random number in a more constrained range such as a salary
evenly distributed from 20,000 through 80,000. To transform the result of, for example,
DTLRandUnsignedLong2 to a more useful range, take the result of
DTLRandUnsignedLong2 modulo, the range of your desired distribution, and add that
to the minimum value of the desired range. The C statement that would perform this
transformation for our salary range is:
Salary = (DTLRandUnsignedLong2() % 60001 ) + 20000;
The distribution of the numbers returned by either procedure is an even distribution.
Simple transformations like the one shown previously are also likely to produce even
distributions. There are, however, other useful distributions, most notably the Normal
distribution, which can be generated from an even distribution.
DTLRandUnsignedLong
This procedure returns the next unsigned 32-bit number from a pseudo-random series
with a period of 1,073,741,824. The syntax for this procedure follows:
The algorithm used is the multiplicative congruential pseudo random number generator
with a seed value of 1, described in Modern Statistical, Systems, and GPSS Simulation
by Zaven A. Karian and Edward J. Dudewicz, W. H. Freeman & Co., October 1990,
page 90.
DTLRandUnsignedLong2
This procedure returns the next unsigned 32-bit number from a pseudo-random series
with a period of about 2**47. DTLRandUnsignedLong2 has a number of advantages
over DTLRandUnsignedLog and we strongly suggest using it instead. The syntax for
this procedure follows:
The algorithm used is the Lagged Fibonacci Generator (17,5,31) after Marsaglia with a
LCG initialization method after Park and Miller.
unsigned long DTLRandUnsignedLong( void );
unsigned long DTLRandUnsignedLong2( void );