@user2338816 gave this answer in the comments.
There is an easy way to add SQL monitoring for specific jobs.
STRDBMON OUTFILE(QGPL/DBMON) JOB(*ALL/QTMHHTTP/WEBSERVER) FTRSQLCODE(*NONZERO)
Starts a monitor that monitors all jobs (current or future) for user QTMHHTTP, job WEBSERVER, logging all statements that give a warning or error.
See here for details on the resulting QGPL/DBMON database file.
You can then cross reference the job number/time in the job log if you need some context.