Dataloader/MP Reference Manual

Table Of Contents
Creating a Customized Version of DataLoader/MP
DataLoader/MP Reference Manual424148-003
5-9
INSTRUCTIONS
Updating DataLoader/MP’s internal statistics
Returning a value appropriate for the Status return from INSERTIT.
For this reason, all INSERTIT user exits should follow this format:
INSTRUCTIONS
The INSTRUCTIONS exit is called when DataLoader/MP is preparing to terminate as a
result of being given an invalid parameter. Just before calling INSTRUCTIONS,
DataLoader/MP writes a brief explanation of its valid parameters by calling
DTLWriteToUser. INSTRUCTIONS should write a similar brief description of the user
exits parameters your customized DataLoader/MP accepts by calling DTLWriteToUser.
The syntax for this procedure follows:
If your user exits do not have parameters, INSTRUCTIONS should simply return, or
you can omit an INSTRUCTIONS user exit and let the default one be used.
MISC1, MISC2, MISC3, and MISC4
The MISCn exits are called when you explicitly request them by specifying the number
1, 2, 3, or 4 in the list of user exits called with the -X parameter. A MISCn exit can be
used for any processing that does not fit easily into the other exits.
The syntax for this procedure follows:
When MISCn has to modify a record, to minimize unnecessary data movement, it has
a choice of whether to build the modified record in the same place passed to it (such
as RecIn) or to build the converted record in the output buffer provided (such as
RecOutBuf). If the record is modified in place, its new length is returned in RecInLen.
If the modified record is built in RecOutBuf, its length is returned in RecOutLen.
The value of Status indicates where the modified record is located. If the modified
record is in RecIn, Status should be set to 1. If the modified record is in RecOutBuf,
void INSERTIT( char*Rec, long* RecLen, short* Status )
{
...
EXEC SQL insert ..... ;
*Status = DTLInsertedResult( &sqlcode, &sqlca );
}
void INSTRUCTIONS( void )
void MISC1( char* RecIn,
long* RecInLen,
char* RecOutBuf,
long* RecOutBufLen,
long* RecOutLen,
short* *Status )