IBM Support

SQLCODE -180 versus SQLCODE -181 for DATE, TIME, DATETIME, and TIMESTAMP values

Question & Answer


Question

A different SQL code was returned, than what was previously returned or expected (a SQLCODE180 or -180 is received instead of an SQLCODE181 or -181).

Cause

SQL codes -180 and -181 have the same SQLSTATE 22007, and serve a similar purpose. The timing of the internal processing makes it possible for SQL code -181 to be returned in cases where a -180 was returned before, and vice versa. Thus, an application should check for SQL codes -180 and -181 together. You should generally check for a negative SQL code.

[{"Product":{"code":"SSEPEK","label":"Db2 for z\/OS"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Application Programming","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"7.0;8.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21236615