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-19
Sequential I/O
*/
static DTLLEN offsets[] = { offsetof( input_record, c2 ),
 offsetof( input_record, c3 ),
 offsetof( input_record, c5 ),
 offsetof( input_record, c6[0] ),
 offsetof( input_record, c6[1] ),
 offsetof( input_record, c6[2] )
 };
/*
 This array holds the size of each of the fields to be
 switched. Make sure these entries are in the same order
 as in the offsets array. */
static DTLLEN sizes[] = { sizeof(i_r->c2),
 sizeof(i_r->c3),
 sizeof(i_r->c5),
 sizeof(i_r->c6[0]),
 sizeof(i_r->c6[1]),
 sizeof(i_r->c6[2])
 };
static long NumFields = sizeof(sizes) / sizeof(sizes[0]) ;
assert( sizeof(offsets) == sizeof(sizes) );
i_r = (input_record*) RecIn;
DTLSwitchEndian( (char*) i_r, &NumFields, offsets, sizes );
*Status = 1;
}
Sequential I/O
DataLoader/MP’s file system is available to user exits and is quite straightforward. For 
example, to open a file, call DTLOpen with the name of the file. DTLOpen returns a file 
number that is passed to the other routines for accessing the file. DataLoader/MP’s file 
number is different from a Guardian file number.
DTLClose
This procedure closes a file previously opened by DTLOpen. Any files opened by 
DataLoader/MP’s file system that are still open when DataLoader/MP performs a 
normal termination are closed by DataLoader/MP. 
The syntax for this procedure follows: 
DTLOpen
This procedure opens the file whose name, together with any requested features, is 
pointed to by Name. 
The syntax for this procedure follows: 
void DTLClose( short FileNum );
short DTLOpen( char* Name, char* AccessMode );










