Oh, and @Rachel1, one more thing: There are a series of SQL related macro variables that get created when you run explicit pass through SQL or HQL. See graphic, below. The one that might be interesting to the write to the log is SQLXMSG. This is the message returned by the database. SQLXMSG is complementary to SQLRC. I would add SQLXMSG to the list of macro variables to write to the log that I gave you in my earlier response. It may tell us nothing that we don't already know, but it's worth a shot.
Jim
P.S. If you have time, why not add all of these to the list that gets written to the log? I suspect SQLXRC and SQLXMSG are the ones that will be most useful, but the others won't hurt.
... View more