AS/400 Job Queue Information

290 pts.
Tags:
AS/400
AS/400 jobs
CL Program
I would like to know from CL whether a specific job exists in the job queue or not before submitting another job.


Software/Hardware used:
As400, CL400
1

Answer Wiki

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

Hey,

You could consider using this API ‘QUSRJOBI’ with format ‘JOBI0300′.

It Returns you Job Status, JOBQ details and few other details which you might need. Here You go for full details.
Pradeep.

Discuss This Question: 5  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.
  • TheRealRaven
    What if the job is currently active rather than being on a job queue? Do you still want to put the job on the queue?
    34,485 pointsBadges:
    report
  • Babs312
    Yes, if it is active, I would like to put the job on the queue.
    290 pointsBadges:
    report
  • deepu9321
    In this case, You can have the Subsystem Configurations for this JOBQ to have only one JOB running at any moment.

    This will help you system handle your situation automatically, instead of checking for Job status.
    4,980 pointsBadges:
    report
  • TheRealRaven
    The QUSRJOBI API almost certainly will not work because it would require the fully qualified name. You'd probably need to use the QUSLJOB API to list jobs with that name, and ideally also with a job user name but with *ALL for job number. Use '*JOBQ' for the Status. Then just check the number of jobs returned to the list to see if it's zero or not.
    34,485 pointsBadges:
    report
  • Babs312
    Hi ALL,
    THanks for the information.
    290 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.

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

Following

Share this item with your network: