Dataloader/MP Reference Manual
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introduction to DataLoader/MP
- 2 DataLoader/MP Components
- 3 Running DataLoader/MP
- 4 Specifying File-Related Options for DataLoader/MP
- 5 Creating a Customized Version of DataLoader/MP- User Exits
- User Exit Descriptions- BUILDKEY
- CHECKARG
- CONVERTIT
- DELETEIT
- DONEWITHTRANSACTION
- EXITSDESCRIPTION
- GETNEXTRECORD
- INITIALIZE1
- INITIALIZE2
- INSERTIT
- INSTRUCTIONS
- MISC1, MISC2, MISC3, and MISC4
- NEWTRANSACTION
- NEXTINDIRECTFILE
- SKIPPING
- STATISTICSTIME
- TERMINATING
- T0330U00_DEFAULTEXITS_C
- T0330U00-DEFAULTEXITS-COBOL
- T7900D41_DEFAULTEXITS_C
- T7900V00-DEFAULTEXITS-COBOL
- UPDATEIT
 
- Default User Exits
- DataLoader/MP Library
- The MAKE Routine for NM DataLoader/MP
- The MAKE Routine for Nonnative Mode DataLoader/MP
 
- 6 DataLoader/MP Examples
- 7 Recovery Strategies
- A Error and Warning Messages
- B Processing Flowcharts
- C C-Only Error Functions
- Index

Creating a Customized Version of DataLoader/MP
DataLoader/MP Reference Manual—424148-003
5-6
DELETEIT
DELETEIT 
The DELETEIT exit is called when you explicitly request it by specifying the letter d or 
D in the list of user exits called through the -X parameter. Its function is to attempt to 
delete a row from the database. 
The syntax for this procedure follows:
If the deletion is successful, DELETEIT should return a positive value. If the deletion is 
not successful, it should return a negative value. If the record should not be processed 
any more by DataLoader/MP, DELETEIT should return a zero (0) value.
To make it easier to collect statistics on row deletions, a utility procedure named 
DTLDeletedResult is provided and should be called immediately after the execution of 
the embedded SQL delete. This utility does a number of things:
•
Checking SQLCODE
•
Checking the SQLCA
•
Updating DataLoader/MP’s internal statistics
•
Returning a value appropriate for the Status returned from DELETEIT
For this reason, all DELETEIT user exits should follow this format:
DONEWITHTRANSACTION 
The DONEWITHTRANSACTION exit is called only if the -T parameter is specified, just 
before DataLoader/MP commits the current transaction. 
The syntax for this procedure follows: 
The purpose of this exit and its associated exit NEWTRANSACTION is to enable the 
use of SQL cursors together with TMF protection. All work done with a cursor must be 
done under the same transaction under which the cursor was opened. For example, 
you cannot open a cursor at the beginning of a job, do a number of transactions, and 
close the cursor at the end of the job. The cursor must be closed at the end of each 
transaction and reopened (specifying the next set of data to be processed) at the 
beginning of the next one. DONEWITHTRANSACTION and NEWTRANSACTION 
provide opportunities to close any open cursors and open any new cursors.
void DELETEIT( char*Rec, long* RecLen, short* Status )
void DELETEIT( char*Rec, long* RecLen, short* Status )
{
...
EXEC SQL delete ..... ;
*Status = DTLDeletedResult( &sqlcode, &sqlca );
}
void DONEWITHTRANSACTION( void )










