TAA Tools
CVTOBJLCK      CONVERT OBJECT LOCKS TO DATA BASE FILE      TAAOBJD

The Convert  Object Lock command  converts the object  locks to a  data
base  file  OBJLCKP with  one  record per  lock.   This  allows  you to
determine  who has the  lock within a program  (ALCOBJ does not provide
any feedback on  which job has  the lock).  The  model file in  TAATOOL
is TAAOBJDP with a format name of OBJLCKR.

A typical command would be entered as:

   CVTOBJLCK   OBJ(xxxx) OBJTYPE(*FILE) OUTLIB(QTEMP)

The command creates  a file named OBJLCKP in QTEMP  with one record for
each  lock that is held.  You  can then read the file  in a CL or other
HLL program.

The API QWCLOBJL is used to convert the locks.

An option  exists  to  determine  whether an  escape  message  will  be
issued if no locks exist on the object.

CVTOBJLCK escape messages you can monitor for
---------------------------------------------

      TAA9897    No locks exist

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

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

   OBJ           The  qualified  object  name  who's  locks  should  be
                 converted.  The library defaults to *LIBL.

   OBJTYPE       The object type such as *FILE, *DTAARA etc.

   MBR           The  member if a  file is  specified.  The  default is
                 *NONE.    For  a  non-data  base  file  objects,  this
                 causes only file level  locks to be converted.   For a
                 data base  file object, no member level  locks will be
                 converted.

                 If  a specific  member is  named (or  *FIRST or *ALL),
                 both  the  member   level  and  data  locks   will  be
                 converted.

   OUTLIB        The  library  in  which   the  file  OBJLCKP  will  be
                 placed.   The default  is *LIBL.  If  the OBJLCKP file
                 does not already exist,  a library must be  specified.

   OUTMBR        The member  of the OBJLCKP  file to be  used.   If the
                 member  does not exist, it  is added.   The default is
                 OBJLCKP.

   REPLACE       A *YES/*NO  value for  whether  the member  should  be
                 cleared before writing  records into it.   The default
                 is *YES.

   NOLCKMSG      A  *YES/*NO/*SPCID  value that  determines  whether an
                 escape  message  will be  sent if  no locks  exist for
                 the object.   The  default  is *YES  which causes  the
                 CPF9898 escape message if no locks exist.

                 *NO may  be specified to  avoid the escape  message in
                 which  case   the  OBJLCKP  file  will  exist  in  the
                 specified library, but not contain any records.

                 *SPCID may be specified to  send TAA9897 as an  escape
                 message if  no locks  exist.   This allows  a specific
                 condition to be monitored for.

File format
-----------

The file name that is output is OBJLCKP.

The model file used is TAAOBJDP with a format name of OBJLCKR.

To see the field names used:

       DSPFMT    TAAOBJDP

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

None.

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

The following TAA Tools must be on your system:

           EDTVAR        Edit variable
           SNDCOMPMSG    Send completion message
           SNDESCMSG     Send escape message
           SNDSTSMSG     Send status message

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

None, the tool is ready to use.

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

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

   CVTOBJLCK     *CMD                      TAAOBJD        QATTCMD
   TAAOBJDC      *PGM          CLP         TAAOBJDC       QATTCL
   TAAOBJDR      *PGM          RPG         TAAOBJDR       QATTRPG
   TAAOBJDP      *FILE         PF          TAAOBJDP       QATTDDS
					

Added to TAA Productivity tools April 1, 1995


Home Page Up to Top