PL/I · DB2 SQLCODE

SQLCODE -199: Illegal Use of Keyword

What does SQLCODE -199: Illegal Use of Keyword mean in PL/I?

The embedded SQL statement has a syntax error at the point of the named keyword. In PL/I programs this is usually a missing colon before a host variable reference, a misplaced semicolon inside the EXEC SQL block, or a DB2 reserved word used as an unquoted identifier.

SQLCODE -199: Illegal Use of KeywordDB2 for z/OS · PL/I (embedded SQL)

Condition

The embedded SQL statement has a syntax error at the point of the named keyword. In PL/I programs this is usually a missing colon before a host variable reference, a misplaced semicolon inside the EXEC SQL block, or a DB2 reserved word used as an unquoted identifier.

Fix

Check the statement text right around the reported keyword for a missing delimiter or host-variable colon, and delimit any reserved word used as a column or table name with double quotes.

Related db2 sqlcode