DataLoader/MX Reference Manual (G06.24+)
Creating a Customized Version of DataLoader/MX
DataLoader/MX Reference Manual—525872-002
5-9
INSTRUCTIONS
•
Checks SQLSTATE
•
Updates DataLoader/MX internal statistics
•
Returns a value appropriate for the Status return from INSERTIT
All INSERTIT user exits should follow this format:
INSTRUCTIONS
The INSTRUCTIONS exit is called when DataLoader/MX is preparing to terminate as a
result of being given an invalid parameter. Just before calling INSTRUCTIONS,
DataLoader/MX writes a brief explanation of its valid parameters by calling
DTLWriteToUser. INSTRUCTIONS should write a similar brief description of user exit
parameters your customized DataLoader/MX accepts by calling DTLWriteToUser.
The syntax is:
If your user exits do not have parameters, INSTRUCTIONS should return, or you can
omit an INSTRUCTIONS user exit and let the default 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. Use MISCn exit for
processing that does not fit easily into other exits.
The syntax is:
When MISCn has to modify a record, to minimize unnecessary data movement, it can
either build the modified record in the same place passed to it (such as RecIn) or 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.
void INSERTIT( char*Rec, long* RecLen, short* Status )
{
...
EXEC SQL insert ..... ;
*Status = DTLInsertedResult( sqlstate );
}
void INSTRUCTIONS( void )
void MISC1( char* RecIn,
long* RecInLen,
char* RecOutBuf,
long* RecOutBufLen,
long* RecOutLen,
short* *Status )