How to: |
The PCKOUT function writes a packed-decimal number of variable length to an extract file. When a request saves a packed-decimal number to an extract file, it typically writes it as an 8- or 16-byte field, regardless of its format specification. With PCKOUT, you can vary the length of the field from 1 to 16 bytes.
PCKOUT(in_value, length, output_format)
where:
Numeric
Is the input value. It can be in packed, integer, single- or double-precision floating-point format. If it is not in integer format, the value is rounded to the nearest whole number.
Numeric
Is the number of bytes in the output_format, from 1 to 16.
Alphanumeric
This function returns the field as alphanumeric, although it contains packed data.
PCKOUT converts CURR_SAL to a five-byte packed format.
PCKOUT(CURR_SAL, 5, 'A5')
iWay Software |