DataLoader/MX Reference Manual (H06.03+, J06.03+)

Creating a Customized Version of DataLoader/MX
DataLoader/MX Reference Manual543544-001
5-26
SQL Error Checking and Statistics Maintenance
The syntax is:
DTLWRITETOUSERCOB
This procedure writes the message to stderr and to stdout (unless stdout is the
same as stderr). If the -Q parameter is specified, the write to stderr is skipped, and
if stdout is the same as stderr, the message is not be written.
This procedure does not increment the error count.
The syntax is:
SQL Error Checking and Statistics Maintenance
The next procedures are designed to be called immediately after you execute an
embedded SQL INSERT, UPDATE, or DELETE statement in user exits. These
procedures check SQLSTATE to determine whether the operation was successful and,
if so, how many rows were affected. This information is used to:
Update DataLoader/MX internal statistics, which are printed out when
DataLoader/MX terminates
Determine the return value of the function, which is positive if the operation is
successful and negative if the operation is unsuccessful
The three procedures are very similar. They differ only in the error checks they make
and the statistics they update.
DTLDeletedResult
This procedure is designed to be called immediately after you execute an embedded
SQL DELETE. It checks the outcome, updates DataLoader/MX internal statistics, and
returns a value of 1 if the delete was successful and a value of -1, otherwise.
The syntax is:
If a customized DataLoader/MX build is done with the MP option, the syntax is:
void DTLWRITETOERRCOB(char* Msg, short* MsgLen );
void DTLWRITETOUSERCOB(char* Msg, short* MsgLen );
short DTLDeletedResult( char *sqlstate );
short DTLDeletedResult( short *sqlcode, void *sqlca );