DataLoader/MX Reference Manual (G06.24+)
Specifying File-Related Options for DataLoader/MX
DataLoader/MX Reference Manual—525872-002
4-8
KEYRANGE
DataLoader/MX does not usually split a record across two files. If the current file
cannot hold the entire next record, the whole record is placed in the next file. The same
result occurs when multiple output files are created because of errors 43 or 45.
Splitting does not occur if the output files are either Guardian files or unstructured files
on OSS.
For OSS files that have the TEXT interpretation (either explicit or implicit), record
splitting can occur if a record spans multiple lines and the first line is successfully
written while writing one of the subsequent lines has an error. The subsequent lines of
the record would be written to the next file, resulting in a split record. If the output files
have to be passed to other programs, such splitting would have to be handled by the
user.
Use the INDIRECT interpretation only for OSS files and Guardian EDIT files. The
TEXT interpretation is implied for OSS INDIRECT files.
KEYRANGE
Specify the KEYRANGE interpretation to indicate to DataLoader/MX that the data is to
be distributed to one of the sets of files listed in the KEYRANGE file, depending on the
key of each record. The file must be an OSS file or a Guardian EDIT file. The TEXT
interpretation is implied for OSS KEYRANGE files.
Each record contains key and file information for an output file. Each key value must
be a string of printable characters enclosed in double quotes. You cannot specify the
double quote character or any nonprintable character in the key value. One of the key
values must be the null string ("", two double quotes, with no space), and it stands for
the lowest possible value of the key. The lines do not need to be in key order.
When a record is written to a KEYRANGE file, DataLoader/MX calls the BUILDKEY
user exit function to determine the key value of the record. If the key contains
nonprintable characters, BUILDKEY should convert the key fields into a representation
that uses only printable characters.
There must be one file with a key value equal to "". In this example, k1 is less than k2,
which is less than k3:
"" file0
k1 file1
k2 file2
k3 file3
Where data is distributed as follows:
key < k1 store in file0
k1 <= key < k2 store in file1
k2 <= key < k3 store in file2
k3 <= key store in file3
If you use the KEYRANGE interpretation with an uncustomized version of
DataLoader/MX, it uses the entire record as the key. The file item can use any
DataLoader/MX interpretations and modifiers.