How to: Reference: |
The FPRINT function converts any type of field except for a text field to its alphanumeric equivalent for display. The alphanumeric representation will include any display options that are specified in the format of the original field.
FPRINT(in_value, 'usageformat', output)
where:
Any format except TX
Is the value to be converted.
Alphanumeric
Is the usage format of the value to be converted, including display options. The format must be enclosed in single quotation marks.
Alphanumeric
The output format must be long enough to hold the converted number itself, with a sign and decimal point, plus any additional characters generated by display options, such as commas, a currency symbol, or a percent sign.
For example, D12.2 format is converted to A14 because it outputs two decimal digits, a decimal point, a possible minus sign, up to eight integer digits, and two commas. If the output format is not large enough, excess right-hand characters may be truncated.
FPRINT converts CURR_SAL (format D12.2)M to a column with format A15:
FPRINT(CURR_SAL, 'D12.2M', 'A15')
iWay Software |