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-34
Sorting With DTLSort
Field
is a value from 1 through 10 that specifies the field to which the column is to be
added.
Coln
is the variable that holds the result.
Lenn
is the maximum number of characters that may be placed in Coln.
Specify a Col and Len pair for each column in the result. DataLoader/MP moves a
maximum of Lenn bytes to its corresponding Coln column.
For a field with n columns added through DTLCartAddCol, use
DTLCARTGENERATEnCOLFIELDCOB.
Sorting With DTLSort
DTLSort provides a very simple interface for sorting.
The syntax for this procedure follows:
Initially DTLSort is in the unintialized state. On the first call, Buf must point to a
null-terminated string describing the key fields and Len must point to the length of the
longest record that will be sorted.
Upon return from this initialization call, DTLSort is ready to take the records to be
sorted. It is called once for each input record where Buf points to the record and Len
points to the length of that record.
When all input records have been given to DTLSort it is called once more with Len
pointing to a -1 to indicate that all the records have been input. The contents of Buf is
irrelevant on this call.
Upon return from this end of input call, DTLSort is ready to return the records in sorted
order. Each call to DTLSort returns the next record in the memory pointed to by Buf,
and the int pointed to by Len is set to the length of the record.
After all records have been returned, the next call causes DTLSort to set the int
pointed to by Len to -1 indicating that all the sorted records have been returned. This
short DTLCARTGENERATE5COLFIELDCOB ( short field,
char* Col1, short Len1,
char* Col2, short Len2,
char* Col3, short Len3,
char* Col4, short Len4,
char* Col5, short Len5);
void DTLSort( char* Buf, int* Len );