i have submitted job using command sbmjob in RPG Program though QCMDEXC. in dbg mode i checked this command executed sucessfully but i am not found job name in system. I used WRKSBMJOB command to see what are all the jobs submitted but i am not found my job.
sbmjob cmd (call pgm (xyz) parm (&a &b))
apart from above cmd i need to specify any thing?
pls advice.
Software/Hardware used:
software
ASKED:
May 5, 2011 5:37 AM
UPDATED:
May 10, 2011 7:01 PM
I suspect the job may have just run very quickly. If it did and there is no spool output, the WRKSBMJOB will not show anything.
On the SBMJOB command, add parms for JOB & JOBQ. Then if you do a DSPLOG QHST with the JOB name for the time period it was submitted you should see entries.
If you want to see what is happening, put the JOBQ on hold that you are submitting it to. Then use STRSRVJOB to setup DEBUG before you release the JOBQ.
I would like to see the program to verify what is in the command parm for QCMDEXC. Try HOLD(*YES) to check the job on the jobq. Set submitting job logging to find messages in the job log. Good Luck!
You shoudl check the history log to verify that your job ran.
use the dsplog command, for the time of submission, and check that the job ran normally.
You could also consider adding some flight recorder metrics to the job. It’s always a good idea to place a ‘starting xyz’ and ‘xyz completed normally’ pair of messages inthe joblog, and whatever other helpful information for diagnostics – record counts and so on.
What happens if you just call the program you are submitting from the command line? Will the program run normally interactively? If so, you may be submitting the job to ‘never/never land’, a jobq that is not assigned to a subsystem description. Or, you may have other issues with the parms on the sbmjob command.
Just my .02.
If the job submitted successfully (and the DSPSBMJOB(*YES) parm is the normal default), then WRKSBMJOB should see the job for as long as it still exists in the system. It won’t matter if it’s on a detached job queue, if it’s running or if it’s completed.
Looking at the history log with the DSPLOG command for the time the job was submitted is the best option to start with.
If system auditing is enabled for job actions, then the system audit journal will have recorded the job’s start and end. Or if job accounting is enabled, the system accounting journal will record job accounting statistics.
Tom