Dataloader/MP Reference Manual

Table Of Contents
Creating a Customized Version of DataLoader/MP
DataLoader/MP Reference Manual424148-003
5-17
Data Conversion
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 indicates that the input
is potentially too large to fit in a 64-bit integer. A packed decimal number can be as
large as 9,999,999,999,999,999,999,999,999,999,999, while the maximum 64-bit
integer is 9,223,372,036,854,775,807. DataLoader/MP 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 for this procedure follows:
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 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 for this procedure follows:
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 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. This conversion is needed 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/MP.
short DTLPackedDecimalToLong (char* PD, long Len,
long* Result);
short DTLPackedDecimalToShort(char* PD, long Len,
short* Result);