IBM Support

DM_TIMESTAMPE如何显示毫秒/微秒

Question & Answer


Question

在CDC for Datastage生成的平面文件里, 会有一些默认的列包含关于这条数据变化的信息,比如DM_TIMESTAMP, 默认的输出格式为: yyyy-MM-dd HH:mm:ss

Answer

CDC for Datastage 有一个系统参数可以用来设置DM_TIMESTAMP输出的格式,如果希望它输出毫秒,可以设置 ds_output_timestamp_formatyyyy-MM-dd HH:mm:ss.SSS

如果您希望DM_TIMESTAMP能输出微秒, 您需要写一个用户出口,调用UserExitJournalHeader.getDSOutputTimestamp().

但是需要注意的是, 除了AS400和zOS, 大多数的源端只能支持到秒的精度.

[{"Product":{"code":"SSTRGZ","label":"InfoSphere Data Replication"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"IIDR Target Engine","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"10.2.1;11.3.3;11.4","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg22011524