TAA Tools
ENDJOBWOL       END JOBS WITH OBJECT LOCKS             TAAOBMZ

The End Jobs With Object  Locks command ends jobs that have  locks on a
specified  object.    All active  batch  and  interactive jobs  holding
locks at the specified levels would be ended.

You must have *JOBCTL special authority to use ENDJOBWOL.

A typical command would be:

            ENDJOBWOL     OBJ(FILEA *FILE)

All  jobs holding any lock on the  first member of *LIBL/FILEA would be
ended.

The  default is  for  a  *CNTRLD  end  with a  30  second  delay  time.
Interactive  jobs may be  locked for  long periods  of time  when using
OPTION(CNTRLD) with a long DELAY parameter.

The command completes when the matching jobs have all ended.

ENDJOBWOL escape messages you can monitor for
---------------------------------------------

      CPF9898    Can be issued for 2 reasons:
                 - User does not have *JOBCTL special authority
                 - There are no jobs holding locks on the object
                 A case specific message is output to the user.

Escape messages from based on functions will be re-sent.

Command parameters                                    *CMD
------------------

   OBJ           Qualified object name.  (Required)

   OBJ           *LIBL is the library default

                 Object type must also be specified.  (Required)

                 Object  type can  be  any system  object type  such as
                 *FILE, *DTAARA, etc.

                 Member name can be specified, if a data base file.

   LCKLVL        A single  value,  or  up  to 5  of  the  special  lock
                 values  can   be  specified.    Special   values  are:
                 *SHRRD,  *SHRNUP, *SHRUPD,  *EXCLRD, and *EXCL.   *ALL
                 is the default.  Specifying  *ALL has the same  effect
                 as specifying all 5 lock levels.

   OPTION        How to end the job.

                 *CNTRLD is  the default  meaning a 'shutdown'  request
                 is signalled to  the job.  If the  job does not end on
                 its  own, the job  will be ended  after the DELAY time
                 specified.

                 *IMMED may  be specified to  end the job  immediately.

   DELAY         How  long to  wait for  a *CNTRLD  type of  end.   The
                 default is 30 seconds.

   MSGQ          A  qualified   message  queue  may  be  specified,  or
                 single values of *NONE, *SBMJOBMSGQ, *USRPRFMSGQ.

                 *NONE is the default.

Restrictions
------------

You must have *JOBCTL special authority.

Prerequisites
-------------

The following TAA Tools must be on your system:

     CHKJOBCTL       Check *JOBCTL special authority
     CHKJOBSTS       Check Job Status
     CVTOBJLCK       Convert Object Lock
     EDTVAR          Edit varible
     RSNLSTMSG       Resend last message
     RTVJOBA2        Retrieve job attributes 2
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message
     SNDPGMMSG3      Send program message 3

Implementation
--------------

None, the tool is ready to use.

Objects used by the tool
------------------------

   Object        Type    Attribute      Src member    Src file
   ------        ----    ---------      ----------    ----------

   ENDJOBWOL     *CMD                   TAAOBMZ       QATTCMD
   TAAOBMZC      *PGM       CLP         TAAOBMZC      QATTCL
   TAAOBMZR      *PGM       RPGLE       TAAOBMZR      QATTRPG
					

Added to TAA Productivity tools November 15, 2016


Home Page Up to Top