DataLoader/MX Reference Manual (G06.24+)
Creating a Customized Version of DataLoader/MX
DataLoader/MX Reference Manual—525872-002
5-12
UPDATEIT
If you use COBOL to write your user exits, the name of this procedure is T0351G10-
DEFAULTEXITS-COBOL.
The syntax is:
UPDATEIT
The UPDATEIT exit is called when you explicitly request it by specifying the letters u,
U, h, or H in the list of user exits called through the -X parameter. Use it to update a
row in the database.
The syntax is:
If the update is successful, it should return a positive value in Status. If the update is
not successful, it should return a negative value. If the record should not be further
processed by DataLoader/MX, UPDATEIT should return a 0 (zero) value.
To make it easy to collect statistics on row deletions, use the utility procedure
DTLUpdatedResult immediately after the execution of the embedded SQL update. This
utility:
•
Checks SQLSTATE
•
Updates DataLoader/MX internal statistics
•
Returns a value appropriate for the Status return from UPDATEIT
All UPDATEIT user exits should follow this format:
Default User Exits
DataLoader/MX includes a set of default user exits, listed in Table 5-3.
void T0351G10_DEFAULTEXITS_C( void )
void UPDATEIT( char*Rec, long* RecLen, short* Status )
void UPDATEIT( char*Rec, long* RecLen, short* Status )
{
...
EXEC SQL update ..... ;
*Status = DTLUpdatedResult( sqlstate );
}