SET CDN=OFF
APP APPENDPATH IBISAMP
EX -lines 4 EDAPUT MASTER,FPTEST,CV,FILE,
FILENAME=FPTEST, SUFFIX=FIX, $
SEGMENT=FPTEST, $
FIELDNAME=TIMEFLD, USAGE=P13.4, ACTUAL=A13, $
EX -lines 3 EDAPUT FOCTEMP,FPTEST,CV,FILE,
142100.0000
151309.3674
-RUN
FILEDEF FPTEST DISK fptest.ftm (LRECL 15 RECFM V
DEFINE FILE FPTEST
TFLD/A8=EDIT(FTOA(TIMEFLD, '(D6)', 'A7'),'99:9$9:99');
END
TABLE FILE FPTEST
PRINT * TFLD
END
Hope this helps....
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
March 10, 2009, 03:13 PM
ypatel
quote:
Originally posted by Tomsweb: I have a report with a time field as USAGE=P13.4, ACTUAL=P7, in the master file description.
When I create a report with that field, it displays as: 142100.0000
Any ideas on how to convert this field to diaplay in report as HH:MM:SS?
Thanks, Tomsweb
Try this Haven't tried myself but the first field converts F to A and takes only first 6 chars, gets rid of decimal points. NEWTIME/A6=FTOA(YOUR_TIMEFIELD, '(P13.4)', NEWTIME); FMTTIME/A8 = EDIT(NEWTIME,'99:99:99');
-Yogesh Patel ------------------------------------------------------------------------ PROD: WF 764 on Linux Apache tomcat v5.5 DEV: WF 768 on Linux
March 10, 2009, 10:07 PM
jimster06
To convert a PACKED field to alpha, PTOA will work better.