In our workshop DB2 is a Database. The below errors I have got many times. The reasons I found are in-correct host variables.
Example: missing codes for CHAR, using ” (double codes) instead of ‘ (Single codes).
-104
ILLEGAL SYMBOL “token”. SOME SYMBOLS THAT MIGHT BE LEGAL ARE: token-list
Explanation
A syntax error was detected where the symbol “token” occurs in the SQL statement. The list of symbols that might be legal shows some alternate symbols that could possibly be correct at that point, if the preceding part of the statement is entirely correct.
However, the preceding part of the statement might be incorrect. For example, if an important keyword is omitted, DB2® detects the error later, and not always immediately after the point where the keyword should appear. The list of alternate symbols are only suggestions. Some of those symbols might not even be legal for statements to be executed by DB2. Those symbols are possibly correct for statements sent to other database management systems.
-199
ILLEGAL USE OF KEYWORD keyword. TOKEN token-list WAS EXPECTED
Explanation
A syntax error was detected in the statement at the point where the keyword keyword appears.
As an aid to the programmer, a partial list of valid tokens is provided in SQLERRM as token-list. Only those tokens that will fit are listed. Some tokens in the list might not be valid in statements to be executed by DB2®; those tokens are valid for sending to other database management systems.
Also read






