JobQ Monitor Directory

Directory .ZIP

objects?





These items include PRCQBATCH, a basic program shell that checks *jobq QBATCH to see if any jobs are on the queue. The program could be generalized by accepting a *jobq name as a parameter rather than as a constant value. Various user space APIs are used to process the list of jobs returned from the QUSLJOB API.

Please read the @GENERAL DISCLAIMER document for any items you should be aware of if you download any of these items.


CLPs

PRCQBATCH -- Process QBATCH Jobq:

This program uses a number of Work Management and User Space API command shells to check the QBATCH job queue. The source code given here does not actually do anything to any queued jobs; its purpose is simply to illustrate the usage of these API command shells. If an action should be performed, the source could be modified to alter the CHGJOB command or to execute different commands. The only action performed here is a SNDPGMMSG that notifies you when a job is found on any *jobq. Note that SNDPGMMSG is outside of the IF statement that precedes it and CHGJOB is inside. Therefore, SNDPGMMSG runs for every job found and CHGJOB runs only for jobs found on QBATCH.

CMDs

LUSJOB -- List Job (QUSLJOB):

The command definition object source for QUSLJOB. This command accepts parameters defining job characteristics and lists jobs matching those characteristics into a user space. (Note that the Open List of Jobs (QGYOLJOB) API might be more appropriate in any given situation. QUSLJOB does not allow selecting jobs by a specific *jobq name, only by *jobq status. However, QUSLJOB is a significantly simpler API to use.)

RTVJOBI -- Retrieve Job Information (QUSRJOBI):

The command definition object source for QUSRJOBI. This command accepts parameters specifying a specific job and returns a structure of information about that job. Info may be requested by job name or by "Internal job identifier". This 'identifier' is used here and is made available through the QUSLJOB API.

RTVJOBQI -- Retrieve Job Queue Information (QSPRJOBQ):

The command definition object source for QSPRJOBQ. This command accepts a *jobq name and returns a structure of information about that *jobq. The command is used here to return a count of jobs on the queue. If the count is zero, the programs RETURNs.