DataLoader/MX Reference Manual (G06.24+)

Creating a Customized Version of DataLoader/MX
DataLoader/MX Reference Manual525872-002
5-17
Data Conversion
integer is 9,223,372,036,854,775,807. DataLoader/MX checks to make sure that Len
is not greater than nine.
DTLPackedDecimalToLong
This procedure converts a packed decimal field into a 32-bit integer. The behavior is
the same as DTLPackedDecimalToLongLong, except that the result is stored in a long
field instead of long long. The range of the value is between -2,147,483,648 and
2,147,483,647.
The syntax is:
The value returned by this procedure indicates the outcome of the conversion. A value
of 1 means that the conversion was successful. A value of 0 (zero) means that the
input string was not a valid packed decimal field. A value of -1 means that the input is
too large to fit in a 32-bit integer.
DTLPackedDecimalToShort
This procedure converts a packed decimal field into a 16-bit integer. The behavior is
the same as DTLPackedDecimalToLongLong, except the result is stored in a short
field instead of long long. The range of the value is between -32,768 and 32,767.
The syntax is:
The value returned by this procedure indicates the outcome of the conversion. A value
of 1 means that the conversion was successful. A value of 0 (zero) means that the
input string was not a valid packed decimal field. A value of -1 means that the input is
too large to fit in a 16-bit integer.
DTLSwitchEndian
This procedure converts big-endian fields to little-endian fields (or the reverse), in
place. Use this procedure when importing or exporting binary data from or to a system
whose byte order for binary fields is different from the byte order of the system running
DataLoader/MX.
The syntax is:
short DTLPackedDecimalToLong (char* PD, long Len,
long* Result);
short DTLPackedDecimalToShort(char* PD, long Len,
short* Result);
void DTLSwitchEndian (char* Buf, long* NumFields,
DTLLEN* Offsets, DTLLEN* FieldSizes);