TAA Tools
ENDDUPJOB      END DUPLICATE JOBS                         TAAJOBE

The End  Duplicate  Job command  ends all  jobs  with duplicate  names.
This allows you  to end all jobs at a workstation  (e.g.  group jobs or
system request jobs) with a single command.

When  ENDJOB is  used without a  qualified name, the  command will fail
if jobs of the same name are  in existence.  The jobs of the  same name
may  already be  completed, but  the  job name  is still  known to  the
system if a spooled file exists.

ENDDUPJOB  can also be used  to end jobs  that are on a  job queue.  In
fact, you must  be careful about  duplicate names as  the command  will
end any active or job queue jobs of the same name.

A typical command would be entered as:


or you could enter a partially qualified name as:


The  command is  designed so  it  will fail  if  no jobs  exist of  the
specified  name.  CPF9898 will  be issued as an  escape message in this

If jobs  do  exist of  the  specified  name, a  completion  message  is
returned stating  the number of  jobs ended and  the number found  that
have already been completed.

To delete  all jobs for JOBA  including all spooled files  and job logs
regardless  of whether  the job  is on  the job  queue, active,  or has
been completed and is on the output queue, enter:


A maximum  of 546 duplicate  job names may  be ended  with each use  of
the command.

Completion message when a single job exists

When only  a single job exists,  ENDDUPJOB will respond saying  the job
has been ended regardless of whether it has already been completed.

Spooled files and job logs

If  a  job has  already completed,  ENDDUPJOB  will remove  all spooled
files including the job log when SPLFILE(*YES) is used.

If a job has  not completed, ENDDUPJOB will  remove all spooled  except
the job  log if SPLFILE(*YES) is  specified.  However,  using LOGLMT(0)
will prevent  the job log from  being written if the job  is on the job
queue or active.

Command parameters                                    *CMD

   JOB           The job name  to be  ended.   This may  be entered  as
                 just the job name  or as user name/job name.   The job
                 number  is  not  supported.    If  just  job  name  is
                 specified  and the job is  a workstation job, all jobs
                 at that  workstation (group  jobs  and system  request
                 jobs) will be ended.

   OPTION        This  is the same  parameter as  on ENDJOB.   However,
                 the default is changed from *CNTRLD to *IMMED.

   DELAY         This  is  the  same  parameter  as  on  ENDJOB.    The
                 default is 30  which is  ignored if OPTION(*IMMED)  is

   SPLFILE       This  is  the  same  parameter  as  on  ENDJOB.    The
                 default is *NO.

                 If  *YES is  specified,  the results  differ depending
                 on whether the job has already been completed.

                 - If  the  job  has  already  completed,  any  spooled
                 files and any job logs will be deleted.

                 - If  the job  is ended  by ENDDUPJOB  (either on  the
                 job  queue  or  because  it  is active),  all  spooled
                 files  will  be  deleted.    The  job  log  created by
                 ending  the  job  will  remain  unless   LOGLMT(0)  is

   DLTJOBLOG     A  *YES/*NO parameter  for whether  to delete  the job
                 log if the job is complete (on the output queue).

                 *NO is the default to retain the job log.

                 *YES   may  be  specified   to  cause   all  job  logs
                 associated with the  job to be deleted  if the job  is

   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
                 no  ENDJOB command had  been specified, *NOMAX  is the

                 *NOMAX   or   a  specific   number  may   be  entered.
                 Entering  0  will  prevent  any  job  log  from  being
                 produced  if the  job is  on  the job  queue or  still
                 active.  See the help text for the ENDJOB command.


A  maximum of 546  duplicate job  names may be  ended with  each use of
the command.


The following TAA Tools must be on your system:

         EDTVAR         Edit variable
         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
   ------        -----      ---------      ----------     -----------

   ENDDUPJOB     *CMD                      TAAJOBE        QATTCMD
   TAAJOBEC      *PGM          CLP         TAAJOBEC       QATTCL

Added to TAA Productivity tools April 1, 1995

Home Page Up to Top