IBM Support

DataStage server job with OCI lookup fails with ORA-01821: date format not recognized

Troubleshooting


Problem

User-defined sql shows use of to_char - TO_CHAR(Date column, 'YYYY-MM-DDHH24:MI:SS')

Resolving The Problem

Add the following environment variable to the project. You can add this as a user-defined environment variable in DataStage Administrator DS_NO_FF = 1.
If DS_NO_FF is set to the value of 1, the Oracle DATE data types are imported as DataStage Timestamp column SQL types and fractional seconds are not supported. If fractional seconds are required then DS_NO_FF should not be set to 1.

NOTE - It may be necessary to also add this in dsenv if you call before and/or after job sql scripts.

At release 7.5.3 and higher the ORAOCI supports timestamp . This means a timestamp sql value will look like SELECT TO_CHAR(HIT_DATE, 'YYYY-MM-DD HH24:MI:SS') but DataStage
appends .FF at run time versus in a user defined it will not append this conversion.

[{"Product":{"code":"SSVSEF","label":"IBM InfoSphere DataStage"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Not Applicable","Platform":[{"code":"PF033","label":"Windows"},{"code":"PF027","label":"Solaris"},{"code":"PF016","label":"Linux"},{"code":"PF010","label":"HP-UX"},{"code":"PF002","label":"AIX"}],"Version":"8.1;8.0;7.5","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21429040