TAA Tools
CVTLIBLCK       CONVERT LIBRARY LOCKS                  TAALIDI

The  Convert  Library  Locks command  converts  any  locks  held  on  a
library  and   any  objects  within   the  library.     This  allows  a
determination  of  whether  any  locks  exist  before  a  function that
requires exclusive use of  the library.  The  model file in TAATOOL  is
TAAOBJDP with a format name of OBJLCKR.

See the  CVTLIBLCK2 command to determine  who has locks on  one or more
library object types.

A typical series of commands would be:

            DCLF        FILE(TAAOBJDP) /* CVTOBJLCK model file */
             .
            OVRDBF      TAAOBJDP TOFILE(QTEMP/OBJLCKP) SECURE(*YES)
            CVTLIBLCK   LIB(xxx) OUTLIB(QTEMP)
            MONMSG      MSGID(TAA9892) EXEC(DO) /* Locks exist */
 READ:      RCVF
            MONMSG      MSGID(CPF0864) EXEC(GOTO EOF)
                        /*                                  */
                        /*   Your handling of locks         */
                        /*                                  */
            GOTO        READ
 EOF:                   /* All locks have been processed    */
            ENDDO       /* Locks exist */

By  default, the TAA9892  message is sent  as an escape  if locks exist
on either the library or any objects within the library.

If locks exist, they would be written to the OBJLCKP file in QTEMP.

Considerations
--------------

  **   If the user running the  command is not authorized to an  object
       within the  library, the object will  not be checked  for locks.

  **   Locks  on a  library are set  if the  library exists on  a job's
       library list or has been explicitly requested.

  **   Because there is a time  delay between accessing the objects  in
       the  library and  checking  for locks,  the  situation may  have
       changed when the command completes.

  **   If  exclusive  locks  are  held,  CVTLIBLCK  is  still  able  to
       determine the status.

CVTLIBLCK escape messages you can monitor for
---------------------------------------------

      TAA9892    Locks exist (if ESCMSG(*YES)

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

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

   LIB           The  library  to check  locks for.   Both  the library
                 and  objects  within  the  library  are   checked  for
                 locks.

   OBJ           The  object  to  convert  locks  for.    *ALL  is  the
                 default.   A  specific object  name or a  generic name
                 may be entered.

   OBJTYPE       The object type  to convert  locks for.   *ALL is  the
                 default.   For  a list  of the  supported values,  use
                 the prompter.

   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.

                 OBJLCKP uses  the same name and format  as used by the
                 CVTOBJLCK tool.

   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.

   ESCMSG        A *YES/*NO  value that  determines whether  an  escape
                 message will  be sent if  locks exist for  the library
                 or  any objects  within the library.   The  default is
                 *YES  which  causes  the  TAA9892  escape  message  if
                 locks exist.

                 *NO may  be specified to  avoid the escape  message if
                 locks exist.

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

See the 'Considerations' section.

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

The following TAA Tools must be on your system:

     CVTOBJLCK       Convert object lock
     DUPTAADBF       Duplicate data base file
     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
   ------        ----    ---------      ----------    ----------

   CVTLIBLCK     *CMD                   TAALIDI       QATTCMD
   TAALIDIC      *PGM       CLP         TAALIDIC      QATTCL
					

Added to TAA Productivity tools October 15, 2009


Home Page Up to Top