XTPACK: Writing a Packed Number With Up to 31 Significant Digits to an Output File

How to:

The XTPACK function stores packed numbers with up to 31 significant digits in an alphanumeric field, retaining decimal data. This permits writing a short or long packed field of any length, 1 to 16 bytes, to an output file.


Top of page

x
Syntax: How to Store Packed Values in an Alphanumeric Field
XTPACK(in_value, outlength, outdec, output)

where:

infield

Numeric

Is the packed value.

outlength

Numeric

Is the length of the alphanumeric field that will hold the converted packed field. Can be from 1 to 16.

outdec

Numeric

Is the number of decimal positions for output.

output

Alphanumeric



Example: Writing a Long Packed Number to an Output File

XTPACK converts LONGPCK to alphanumeric so that it can be saved in an output file:

XTPACK(LONGPCK,13,2,'A13');

iWay Software