Using the DB2UTIL procedure might result in a -104 DB2 error


Using the DB2UTIL procedure to update a DB2 table might result in a DB2 error similar to the following:

DSNT408I SQLCODE = -104, ERROR: ILLEGAL SYMBOL " SOME SYMBOLS THAT MIGHT BE LEGAL ARE: NOT EXISTS XMLEXISTS ( USER ? CURRENT CURRENT_SCHEMA ROW

This problem occurs when the WHERE statement is split such that the word WHERE is on one line and the conditions that make up the WHERE statement are on subsequent line(s).

The following code illustrates one case that can produce the error:

 

proc db2util data=deletevals table=testid.actions
function=delete ssid=db2 limit=0 commit=0;
mapto del_date = action_dt;
where
action_dt < '2010-01-01' and
action_dt >= '2000-01-01' and
action_Dt = %del_date;
update;
run;
 

To work around the issue, make sure that at least part of the condition appears on the same line as the word WHERE.