TAA Tools
ALCOBJ2         ALLOCATE OBJECT 2                     TAAOBJN

The Allocate  Object 2  command does  the same function  as the  system
command  ALCOBJ, but  provides  better feedback  in messages.    If the
allocation  is  successful,  a  completion message  is  sent.    If the
object cannot be allocated,  diagnostic messages are sent for  each job
that has  a conflicting lock  followed by an escape  message (CPF1002).

The command syntax is designed to look like ALCOBJ.

A typical command would be:

       ALCOBJ2  OBJ((xxxx *FILE *SHRNUP)) WAIT(0)

The  first member of the file  named would attempt to  be locked with a
*SHRNUP lock.    If the  member can  be  locked, a  completion  message
would  be sent  that  describes which  member,  file,  and library  the
object was found in.

If the  object/member cannot be locked, the  TAA Tool CVTOBJLCK is used
to capture the locks currently  on the object/member.  The  information
is  sent  back  as  diagnostic messages.    To  reduce  the  amount  of
information  that needs to  be reviewed, no  messages are sent  for the
following conditions:

  **   If the lock is held by the current job.

  **   If  the lock  state is  not in  conflict.   For example,  if you
       request *SHRNUP,  any jobs  holding a  *SHRRD lock  will not  be
       shown.

  **   If a  data base member is  locked, the system provides  locks on
       the  member and then  either the data  or access path.   From an
       external viewpoint, the member  lock is redundant and  therefore
       is not shown.

As  with the  system ALCOBJ  command,  you cannot  lock certain  object
types nor are all the lock states valid for every object type.

Although the  ALCOBJ2 command prompt allows for  multiple objects to be
entered, only a  single object  is valid  (unlike ALCOBJ).   An  escape
message is issued if multiple objects are specified.

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

   OBJ           A list may be entered that is the same as ALCOBJ.

        OBJ           The qualified  name of the  object to  be locked.
                      The  library value  defaults to  *LIBL.   *CURLIB
                      may also be specified.

        OBJTYPE       The  object type.  Any  object type valid for the
                      system command ALCOBJ may be specified.

        LOCKSTATE     The lock state  requested.   The same values  may
                      be  entered  as  on  the  system  ALCOBJ  command
                      which    includes   *SHRRD,   *SHRUPD,   *SHRNUP,
                      *EXCLRD,  and  *EXCL.    Not  all  types  may  be
                      specified on  every object  type.   Refer to  the
                      system command for a complete discussion.

        MBR           The  member   name  if  a  data  base  object  is
                      specified.   If a  data  base file  is  specified
                      without a  value, the  first member is  attempted
                      to be locked (same default as on ALCOBJ).

   WAIT          The  wait  time  to  wait  if the  object  is  already
                 locked.    The default  is  *CLS which  refers  to the
                 class wait time (same default as on ALCOBJ).

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

The  same restrictions  exist  as  with ALCOBJ  regarding  what  object
types may be locked and what lock states are valid.

Only a single object/member may be locked.

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

The following TAA Tools must be on your system:

     CVTOBJLCK    Convert object lock
     RTVDIAGMSG   Retrieve diagnostic message
     SNDCOMPMSG   Send completion message
     SNDDIAGMSG   Send diagnostic message
     SNDESCMSG    Send escape message

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

None, the tool is ready to use.

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

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

   ALCOBJ2       *CMD                   TAAOBJN       QATTCMD
   TAAOBJNC      *PGM       CLP         TAAOBJNC      QATTCL
					

Added to TAA Productivity tools May 1, 1996


Home Page Up to Top