Troubleshooting
Problem
Cognos Analytics provides a set of built-in functions that perform date and time calculations. For example, incrementing or decrementing days from a date, timestamp or timestamp with time zone by using _add_days.
If an expression is defined with a parameter using an incorrect data type, it might result in a SQL statement which includes syntax that is not supported by the underlying database.
Details on the built-in functions are available in the IBM Knowledge Center.
Queries that fail throw exceptions such as:
Db2 throws an exception, error occurred processing a conditional compilation directive near "_". Reason code="7".. SQLCODE=-20521
If an expression is defined with a parameter using an incorrect data type, it might result in a SQL statement which includes syntax that is not supported by the underlying database.
Details on the built-in functions are available in the IBM Knowledge Center.
Queries that fail throw exceptions such as:
XQE-PLN-0098 The vendor specific function "_year" is not supported. query:"Query1": dataItem:"Data Item1": "_year(1)"=== Please see http://www.ibm.com/search?q=XQE-PLN-0098 for more information ===.
Db2 throws an exception, error occurred processing a conditional compilation directive near "_". Reason code="7".. SQLCODE=-20521
Symptom
An exception is displayed in the user interface or logs on the Cogos Application tier servers such as the following example:

Document Location
Worldwide
[{"Line of Business":{"code":"LOB76","label":"Data Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSTSF6","label":"IBM Cognos Analytics"},"ARM Category":[{"code":"a8m0z0000001jleAAA","label":"Dashboards"},{"code":"a8m500000008d78AAA","label":"Reporting"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"},{"Product":{"code":"SS6G84","label":"IBM Cognos Analytics on Cloud"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":" ","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB76","label":"Data Platform"}},{"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":" ","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB77","label":"Automation Platform"}}]
Log InLog in to view more of this document
This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.
Was this topic helpful?
Document Information
Modified date:
14 January 2026
UID
ibm16348212