iSeries – Job Queues and Subsystems

65 pts.
Tags:
AS/400 commands
I have a jobq called STX400 in MYLIB. How can i find out what Subsystem is used to process jobs from it?

Software/Hardware used:
iSeries, AS400

Answer Wiki

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

You can use the Retrieve Job Queue Information (QSPRJOBQ) API to access that information from a program. The following CL program will display the subsystem currently receiving jobs from MYLIB/STX400 or, if the job queue is not associated with an active subsystem, the message ‘Job queue is not active’.

Pgm
Dcl Var(&Rcv) Type(*Char) Len(256)
Dcl Var(&Rcv_Size) Type(*Int) Value(256)
Dcl Var(&ErrCde) Type(*Int) Value(0)

Call Pgm(QSPRJOBQ) Parm(&Rcv &Rcv_Size JOBQ0100 +
'STX400 MYLIB ' &ErrCde)

If Cond(%Sst(&Rcv 63 10) *EQ ' ') +
Then(SndPgmMsg Msg('Job queue is not +
active') ToPgmQ(*Ext))
Else Cmd(SndPgmMsg Msg(%Sst(&Rcv 63 10)) +
ToPgmQ(*Ext))
EndPgm

Hope this helps,
Bruce Vining

————————————————————————————-

Use WRKJOBQD command .

Discuss This Question: 1  Reply

 
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
  • Lovemyi
    WRKJOBQD is not a command on V5R4 or lower of the OS. It may be a custom command. The only way to see what subsystem is using the jobq is to WRKJOBQ with the default of *ALL speicified and then on the right side you will see the subsystem that it is attached to if the subsystem is started and attached. Otherwise you need to look at the subsystem descriptions and for that use the WRKSBSD command *ALLl/*ALL to see all subsystems in all libraries and then put a 5 to display and then option 6 to view job queue entries. This will show what jobq are attached and how many jobs can run from that jobq in the subsystem at any time and also what the priority of the jobq is. Makes sure you have the right subsystem and there are several versions for the system supplied subsystems or possibly even custom subsystems, So make sure you have the right one. Lovemyi
    2,310 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