The Display Active Jobs command provides a display that is similar to
that provided by the system WRKACTJOB command except that the user
cannot perform change actions against the jobs and no CPU utilization
information is provided. An option exists to allow a display of any
spooled files associated with the job. DSPACTJOB may be helpful if
you have a menu oriented system and want to prevent users from
changing, holding, or ending active jobs.
The intent of the command is that it would be used in place of
WRKACTJOB as an option on a user menu. It allows a user to see what
other jobs exist in the system. No command line exists. However, if
the spooled file option *WRK is specified, a command line does exist
on the system spooled file display.
A typical command would be:
The display that appears is similar to that provided by WRKACTJOB,
but would only allow the option to display more details about the job
or to work with the spooled files of the job.
The SPLF parameter allows control of whether the user will be allowed
to see any spooled files of a job, just display the spooled files, or
have the full capability of WRKJOB OPTION(*SPLF).
Access to spooled files requires the user to be the owner of the
spooled file or have *JOBCTL special authority. DSPACTJOB does not
adopt a profile during the processing of spooled files.
The DSPJOB3 command is available as an option unless SPLF(*NONE) is
specified. DSPJOB3 allows users to display other jobs as if they had
*JOBCTL authority. DSPJOB3 requires either *JOBCTL special authority
or authorization to the TAAJOBCTL authorization list.
The F16 key may be used in conjunction with cursor positioning to
sequence the data. For example, if the cursor is placed in the
'User' column and F16 is pressed, the data appears sequenced by user.
Placing the cursor in the first two positions of the 'Subsystem/Job'
field causes the jobs to be sequenced within subsystem. Placing the
cursor in the last ten positions of the 'Subsystem/Job' field causes
the jobs to be sequenced by job name.
The APIs used include:
In order to retrieve the information about jobs that are not the
users own, the RTVJOBAPI tool is used. This adopts the QSECOFR
profile while job information is being retrieved to allow for *JOBCTL
special authority. This provides the user with more authority than
he would receive from WRKACTJOB in terms of displaying information
about a job. If you feel this is too much information, make the
DSPACTJOB command private.
If the SPLF option is *DSP or *WRK, the user can only display or work
with his own spooled files. Program adoption is not used when the
spooled file option is selected.
If the SPLF option is *NONE, the DSPJOB3 option is not available
because DSPJOB3 invokes DSPJOB which offers an option to display
Command parameters *CMD
SPLF Whether to allow the user to display or work with
the spooled files of the jobs.
To operate on a spooled file requires the user to be
the owner of the spooled file or have *JOBCTL
special authority. DSPACTJOB does not adopt a
profile during the processing of spooled files.
The default is *WRK which causes the function of
WRKJOB JOB(xxx) OPTION(*SPLF) to be used. The user
would have full control to display, change, or
delete the spooled files in addition to being able
to respond to spool messages.
*DSP may be specified to cause the function of
DSPJOB JOB(xxx) OPTION(*SPLF) to be used. The user
can only display the spooled files associated with
*NONE may be specified to prevent the user from any
access to the spooled files of the job. *NONE also
prevents the DSPJOB3 option.
SBS A list of subsystems containing jobs to be
*ALL is the default for all subsystems.
A list of up to 300 subsystems may be entered. Only
the jobs in the named subsystems will be displayed.
JOB The job name to display. *ALL is the default for
all jobs. A generic name or a specific job name may
USER The user name to display. *ALL is the default for
all users. A generic name or a specific user name
may be entered.
JOBTYPE The job type to display. * is the default and means
all jobs. The other supported values are
A=Autostart, B=Batch (includes BCH, BCI, PJ, and
other batch types), I=Interactive, M=Monitor,
R=Spool reader, S=System job, X=Start CPF, and
STATUS The status to display. *ALL is the default. Up to
20 values may be entered such as SELW, MSGW, etc.
See the WRKACTJOB help text of the 'Status' field
for a full discussion of the valid entries.
A maximum of 9999 jobs can be displayed. If the limit is exceeded, a
message appears on the first display informing the user that not all
jobs are shown.
The following TAA Tools must be on your system:
CVTDTS Convert date/time in *DTS format
FILEFDBCK File feedback
HLRMVMSG HLL Remove message
RTVJOBAPI Retrieve job API
SNDESCMSG Send escape message
None, the tool is ready to use.
Objects used by the tool
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
DSPACTJOB *CMD TAAJOCG QATTCMD
TAAJOCGC *PGM CLP TAAJOCGC QATTCL
TAAJOCGR *PGM RPG TAAJOCGR QATTRPG
TAAJOCGD *FILE DSPF TAAJOCGD QATTDDS
Note that the RPG is the CPP and calls TAAJOCGC.