What it means
Db2 reads the statement from left to right. When it meets a symbol that does not fit, it stops and returns -104 with SQLSTATE 42601. The message names that symbol as the token. The statement is not run.
The named token is only where Db2 noticed the problem. The cause may sit before it, for example a keyword that was left out. The same code is also returned when ROLLBACK TO SAVEPOINT is written without a savepoint name.
Typical causes
- A keyword or clause earlier in the statement is missing, so a later symbol looks out of place.
- A symbol appears where the statement format does not allow it.
- ROLLBACK TO SAVEPOINT was coded without naming the savepoint.
How to fix it
- Read the token in the message and find it in the statement text.
- Check the text just before that token, not only the token itself.
- For a savepoint rollback, add the savepoint name.
- Correct the statement and run it again.
Example
Illustrative only; names and values are invented.
DSNT408I SQLCODE = -104, ERROR: ILLEGAL SYMBOL "FORM"
DSNT418I SQLSTATE = 42601 SQLSTATE RETURN CODE