The End Job 2 command provides for ending multiple jobs such as
generic job names, generic user names, etc. The parameters of the
command (such as OPTION and DELAY) are passed to individual ENDJOB
commands for active jobs that meet the selection criteria. You must
have *JOBCTL special authority to use ENDJOB2.
A typical command would be:
ENDJOB JOB(ABC*)
All job names beginning with ABC would be requested to be ended. The
completion message for each ENDJOB issued is resent.
The current job may not be ended and is bypassed by the processing.
If the current job is requested to be ended with the default of
ADLINTJOBS(*NONE) and a group job exists (same job name), the group
job will be ended.
ENDJOB2 escape messages you can monitor for
-------------------------------------------
TAA9896 No jobs match the selection criteria
TAA9897 One or more jobs failed on ENDJOB
Escape messages from based on functions will be re-sent.
ENDJOB2 Command parameters *CMD
--------------------------
JOB The job name to be ended. A generic job name, *ALL,
or a specific job name may be entered.
USER The user profile of a job to be ended. The default
is *ALL for all users. A generic user name, *ALL,
or a specific user name may be entered.
SBS The subsystem containing the jobs to be ended. The
default is *ALL for all subsystems. A generic
subsystem name may be entered. Note that ending
jobs in a subsystem does not end the subsystem.
JOBTYPE The job type to ended. * is the default and means
all job types. The other supported values are
A=Autostart, B=Batch, I=Interactive, M=Monitor,
R=Spool reader, S=System job, X=Start CPF, and
W=Spool writer.
OPTION How to end the job. This value is passed thru to
the ENDJOB command. *CNTRLD is the default to allow
the job to perform cleanup. *IMMED may be specified
to end the job immediately.
DELAY The delay time for a controlled cancel. This value
is passed thru to the ENDJOB command. The default
is 30 seconds.
SPLFILE Whether the spooled files are kept or deleted. This
value is passed thru to the ENDJOB command.
The default is *NO to retain the spooled files.
*YES may be specified to delete the spooled files.
The job log is normally retained, but may be deleted
by specifying LOGLMT(0).
LOGLMT The maximum number of entries that will be written
to the job log when the job is ended. This value is
passed thru to the ENDJOB command.
*SAME is the default which means to use the value
from a previous ENDJOB command for the same job. If
none had been specified, *NOMAX is the default.
*NOMAX or a specific number may be entered.
Entering 0 will prevent any job log from being
produced. See the help text for the ENDJOB command.
ADLINTJOB Whether additional interactive jobs should be ended.
*NONE is the default. This value is passed thru to
the ENDJOB command. The current job is never ended.
*GRPJOB may be specified to end all group jobs.
*ALL may be specified to end all associated jobs.
If ADLINTJOBS(*NONE) is specified for a job
associated with the current job, neither job will be
ended.
Restrictions
------------
You must have *JOBCTL special authority to use ENDJOB2.
Prerequisites
-------------
The following TAA Tools must be on your system:
CHKJOBCTL Check *JOBCTL special authority
CVTWRKACT Convert WRKACTJOB to an outfile
EDTVAR Edit variable
RSNLSTMSG Resend last message
SNDCOMPMSG Send completion message
SNDESCINF Send escape information
SNDESCMSG Send escape message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
ENDJOB2 *CMD TAAJOEQ QATTCMD
TAAJOEQC *PGM CLP TAAJOEQC QATTCL
|