I have a small piece of code that reads a DB file... based on the values in the file, submits several jobs by building a command string (using the variables in the file) and calling QCMDEXC
Is there a way to get any error messages if the SBMJOB fails?
Code:
cmdstring = 'sbmjob cmd(call pgm(MYPGM) ' + 'parm(' + q + %trim(parm1) + q + ')) ' + 'job(' + %trim(jobName) + ') ' + 'jobq(' + %trim(jobQue) + ') ' + 'user(' + %trim(userName) + ')'; monitor; qcmdexc(cmdstring:%len(cmdstring)); on-error; // DO SOMETHING HERE endmon;
Comment