Submitted AS/400 job it’s not found with SBMJOB command

140 pts.
Tags:
AS/400
AS/400 jobs
QCMDEXC
RPG Program
SBMJOB
I have submitted job using command SBMJOB in RPG Program though QCMDEXC. In DBG mode, I checked this command executed successfully but I didn't find job name in system. I used WRKSBMJOB command to see what are all the jobs submitted but I have found my job.

sbmjob cmd (call pgm (xyz)  parm (&a &b))

Apart from above CMD, do I need to anything specific?

Please advice.

Software/Hardware used:
software

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question: 7  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • CharlieBrowne
    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.
    41,380 pointsBadges:
    report
  • PGMBOB
    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!
    1,085 pointsBadges:
    report
  • Yorkshireman
    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,580 pointsBadges:
    report
  • NickHutcheson1
    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 pointsBadges:
    report
  • TomLiotta
    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
    125,585 pointsBadges:
    report
  • Askt1
    [...] 7. TomLiotta, NickHutcheson1, Yorkshireman, PGMBOB, CharlieBrowne, and Aringarosa are all pitching in to help a member find an AS/400 job not found with SBMJOB command. [...]
    0 pointsBadges:
    report
  • Askt1
    [...] AS/400 job not found with SBMJOB command [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following