Focal Point
[SOLVED] Timestamp field in a flat file

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3367082876

September 07, 2015, 05:43 AM
Vishwesh
[SOLVED] Timestamp field in a flat file
I am receiving a timestamp field in a flat file in format YYYY-MM-DD-HH.MM.SS.UUUUUU. I need to load this into a DB2 table. I tried giving declaration of the input field as HYYMDm for Usage and Actual. But i am getting the following error:

(FOC1383) UNSUPPORTED DATETIME FORMAT FOR FIELD : TIME_STAMP

Later I changed the actual declaration to A26 assuming that actual storage requires 26 bytes but then I am getting the following error:
(FOC1418) ACTUAL/USAGE TYPE MISMATCH FOR DATETIME FIELD : TIME_STAMP

Not sure how this could be handled? Any suggestions on this would be helpful.

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.1
UNIX
Excel, HTML & PDF
September 07, 2015, 09:10 AM
GamP
It's a flat file. Meaning that it is probably human readable.
So you'll have to give it an actual format of Axx. And possibly the usage can be something else, although in this case I doubt it. You could then use the HINPUT function to convert the data into a real date-time field.
But since yo need to load it into a DB2 table, I'd first try to find out what DB2 accepts in terms of date-time fields and try to work toward those specifications.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
September 08, 2015, 06:21 AM
Vishwesh
Thanks GamP. I have declared the field as A26 for usage and actual and loaded into DB2 with MODIFY. The loading process worked without explicit conversion from CHARACTER to TIMESTAMP.


WebFOCUS 7.1
UNIX
Excel, HTML & PDF