With the current code flow, if the prepare of the statement to VE fails for any reason (ex: query of a non-existent file), we drop into the catch block, skipping over the call to ENDDBMON.
As a result, any subsequent VE actions on the job fail at the point that the STRDBMON is called, because the job is still being monitored from the failed attempt.
The fail out path needs to ensure that the job monitoring is ended.
https://github.com/ThePrez/CodeForIBMiServer/blob/c94aa56f8f1058a79de434157e6c429b708b5208/src/main/java/com/github/theprez/codefori/requests/DoVe.java#L46
With the current code flow, if the prepare of the statement to VE fails for any reason (ex: query of a non-existent file), we drop into the catch block, skipping over the call to ENDDBMON. As a result, any subsequent VE actions on the job fail at the point that the STRDBMON is called, because the job is still being monitored from the failed attempt. The fail out path needs to ensure that the job monitoring is ended.