140 pts.
 AS/400 job not found with SBMJOB command
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

Answer Wiki:
Hi, You should set the following option to Yes when you are using SBMJOB command. "Allow display by WRKSBMJOB . . . " You must set this to '*YES' You will get this option by giving F10(Additional Parameters) Have verified this option before submitting.? Try the below command. SBMJOB CMD(CALL PGM(XYZ) PARM('A' 'B')) DSPSBMJOB(*YES) Also, you can see you job by using the command WRKUSRJOB USER
Last Wiki Answer Submitted:  May 5, 2011  3:34 pm  by  deepu9321   3,370 pts.
All Answer Wiki Contributors:  deepu9321   3,370 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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.

 32,785 pts.

 

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!

 695 pts.

 

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.

 5,505 pts.

 

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.

 1,380 pts.

 

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

 107,735 pts.