DataLoader/MX Reference Manual (G06.24+)
Creating a Customized Version of DataLoader/MX
DataLoader/MX Reference Manual—525872-002
5-8
INITIALIZE2
The syntax is:
If initialization is successful, move a nonzero value to Status. If initialization fails,
move a 0 (zero) value to Status.
If you return a (0) zero value, DataLoader/MX terminates abnormally. If you want to
display messages about the cause of the initialization failure, you can call DTLWriteErr
to display a message and then return a (0) zero value to Status.
INITIALIZE2
The INITIALIZE2 exit is called once when all arguments have either been processed
by DataLoader/MX (if they are DataLoader/MX arguments) or passed to CHECKARG
(if DataLoader/MX 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 is:
This exit should return a nonzero value if processing completes successfully or a 0
(zero) value if errors occur. DataLoader/MX handles the return from INITIALIZE2
exactly as it does the return from INITIALIZE1.
This exit is always called even if there are no unrecognized arguments and
CHECKARG is not 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. Use it to insert a row into
the database.
The syntax is:
If the insertion is successful, INSERTIT should return a positive value to Status. If the
insertion is not successful, it should return a negative value. If the record should not be
processed any more by DataLoader/MX, INSERTIT should return a 0 (zero) value.
To make it easy to collect statistics on row insertions, call the DTLInsertedResult utility
procedure immediately after the execution of an embedded SQL insert. This utility:
void INITIALIZE1( short* Status )
Note. For more information about the scope of control statements for static SQL, see the
SQL/MX Programming Manual for C and COBOL.
void INITIALIZE2( short* Status )
void INSERTIT( char*Rec, long* RecLen, short* Status )