DataLoader/MX Reference Manual (G06.24+)
Creating a Customized Version of DataLoader/MX
DataLoader/MX Reference Manual—525872-002
5-19
Sequential I/O
 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
The DataLoader/MX file system is available to user exits and is easy to use. 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. The DataLoader/MX 
file number is different from a OSS file descriptor or Guardian file number.
DTLClose
This procedure closes a file previously opened by DTLOpen. Files opened by the 
DataLoader/MX file system that are still open when DataLoader/MX performs a normal 
termination are closed by DataLoader/MX. 
The syntax is: 
DTLOpen
This procedure opens the file whose name, together with any requested features, is 
pointed to by Name. 
The syntax is: 
Name must be null-terminated and must contain either an OSS file name or a Guardian 
file name. If Name starts with one of these characters, DataLoader/MX handles it as a 
Guardian file:
void DTLClose( short FileNum );
short DTLOpen( char* Name, char* AccessMode );










