How to: |
Given an output format, the simplified conversion function FPRINT converts a value to alphanumeric format for display in that format.
Note: A legacy FPRINT function also exists and is still supported. The legacy function has an additional argument for the name or format of the returned value.
FPRINT(value, 'out_format')
where:
Any data type
Is the value to be converted.
Fixed length alphanumeric
Is the display format.
The following request displays COGS_US as format 'D9M', and TIME_DATE as format 'YYMtrD', by converting them to alphanumeric using FPRINT.
DEFINE FILE WF_RETAIL_LITE COGS_A/A25 = FPRINT(COGS_US, 'D9M'); DATE1/A25 = FPRINT(TIME_DATE, 'YYMtrD'); END TABLE FILE WF_RETAIL_LITE PRINT LST.COGS_US COGS_A DATE1 BY TIME_DATE WHERE RECORDLIMIT EQ 10 ON TABLE SET PAGE NOLEAD ON TABLE SET STYLE * GRID=OFF,$ ENDSTYLE END
The output is shown in the following image.
WebFOCUS | |
Feedback |