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-8
INITIALIZE2
The syntax for this procedure follows:
If initialization is successful, move a non-zero value to Status. If initialization fails,
move a zero to Status.
If you return a 0 value, DataLoader/MP will terminate abnormally. If you want to display
messages about the cause of the initialization failure, you can call DTLWriteErr to
display a message, then return with 0 in Status.
INITIALIZE2
The INITIALIZE2 procedure is called once when all arguments have either been
processed by DataLoader/MP (if they are DataLoader/MP’s arguments) or passed to
CHECKARG if DataLoader/MP does not recognize them. This strategy provides the
ability to check that all arguments you require have been provided and to check
relationships between the arguments provided.
The syntax for this procedure follows:
This exit should return a nonzero value if processing completes successfully or a zero
(0) value if errors occur. DataLoader/MP handles the return from INITIALIZE2 exactly
as it does the return from INITIALIZE1.
This procedure is always called even if there are no unrecognized arguments and
CHECKARG is never called.
INSERTIT
The INSERTIT exit is called when you explicitly request it by specifying the letter i, I, h,
or H in the list of user exits called through the -X parameter. Its function is to attempt to
insert a row into the database.
The syntax for this procedure follows:
If the insertion is successful, INSERTIT should return a positive value in Status. If the
insertion is not successful, it should return a negative value. If the record should not be
processed any more by DataLoader/MP, INSERTIT should return a zero (0) value.
To make it easy to collect statistics on row insertions, a utility procedure named
DTLInsertedResult is provided and should be called immediately after the execution of
the embedded SQL insert. This utility procedure does a number of things:
•
Checking SQLCODE
•
Checking the SQLCA
void INITIALIZE1( short* Status )
void INITIALIZE2( short* Status )
void INSERTIT( char*Rec, long* RecLen, short* Status )