CVTJOBQ CONVERT WRKJOBQ TO A DATA BASE FILE TAAJOBG
The Convert Job Queue command uses a system API to access the
information similar to WRKJOBQ and creates the data base file JOBQP
with one record per job on the job queue. This allows you to
automate several functions involving batch jobs.
You must have the special authority *JOBCTL to use CVTJOBQ. The
QUSLJOB API is used.
The typical command would be entered as:
CVTJOBQ JOBQ(xxxx) OUTLIB(QTEMP)
The command creates a file named JOBQP in QTEMP with one record for
each job on the job queue. You can then read the file in a CL or
other HLL program.
By specifying JOBQ(*ALL/*ALL), you can write one record for every job
on all job queues on the system.
The default sequencing of the output will be in the order the jobs
are received from the API. This will rarely agree with the sequence
as seen on WRKJOBQ.
An option exists to sequence the data to match what appears on
WRKJOBQ. This will be a 100% match in most cases. There can be
exceptions such as if multiple jobs are placed on the job queue with
the exact same date and time.
The field JQSORT is generated for the JOBQP file based on rules
within the TAAJOBGR program. It will contain data that can be sorted
on to match WRKJOBQ. For the specific rules of how this field is
generated, scan the TAAJOBGR source for **SORT**.
If SEQ(*WRKJOBQ) is specified, the data is copied from the JOBQP file
to the TAACVTJOBQ file in QTEMP. The TAACVTJOBQ file is created
automatically and has the same format as the JOBQP file plus a key on
the JQSORT field. The data is then copied back to the JOBQP file and
the TAACVTJOBQ file is deleted.
Command parameters *CMD
JOBQ Specifies a qualified name for the JOBQ to be
converted. The default library is *LIBL.
The special entry *ALL/*ALL may be specified to
convert all jobs on every job queue on the system.
If *ALL is specified for the job queue, the library
qualifier must be *ALL or a specific library. If
the library qualifier is *ALL, the job queue name
must be *ALL.
OUTLIB The library in which the file JOBQP will be placed.
The default is *LIBL. If the JOBQP file does not
already exist, a library must be named.
OUTMBR The member of the JOBQP file to be used. If the
member does not exist, it is added. The default is
REPLACE A *YES/*NO value for whether the member should be
cleared before writing records into it. The default
SEQ Whether to sequence the data in the outfile. The
default is *API meaning the data appears in the
sequence as extracted from the API.
*WRKJOBQ may be specified to duplicate the sequence
of the jobs as they appear on the system WRKJOBQ
display. In most situations this will be a 100%
match. See the previous section on WRKJOBQ
The file name that is output is JOBQP.
The model file used is TAAJOBGP with a format name of JQRCD.
To see the field names used:
*JOBCTL authority is required.
The following TAA Tools must be on your system:
CHKJOBCTL Check job control special authority
CVTDTS Convert DTS
DUPFILFMT Duplicate file format
EDTVAR Edit variable
HLRMVMSG HLL Remove message
RTVSYSVAL3 Retrieve system value 3
SNDCOMPMSG Send completion message
SNDESCMSG Send escape message
None, the tool is ready to use.
Objects used by the tool
Object Type Attribute Src member Src file
------ ----- --------- ---------- -----------
CVTJOBQ *CMD TAAJOBG QATTCMD
TAAJOBGC *PGM CLP TAAJOBGC QATTCL
TAAJOBGC2 *PGM CLP TAAJOBGC2 QATTCL
TAAJOBGR *PGM RPG TAAJOBGR QATTRPG
TAAJOBGP *FILE PF TAAJOBGP QATTDDS
TAAJOBGQ *FILE PF TAAJOBGQ QATTDDS
The TAAJOBGQ file is used for SEQ(*WRKJOBQ) processing.
Added to TAA Productivity tools April 1, 1995