TAA Tools
ADDUNQMBR       ADD UNIQUE MEMBER                      TAADBLT

The Add  Unique  Member command  adds a  unique member  to an  existing
data  base  file.   The  naming  convention  UNQnnnnnnn  is used  where
nnnnnnn  is  a number  in the  range of  1 to  9,999,999.   The maximum
members in  a file at  one time  may only  be 32,767.   A return  value
exists for  the member  name that was  assigned.  The  text description
parameter should contain the purpose of the member.

See the RMVOLDMBR2 tool for a method of removing old members.

A typical series of commands would be:

             DCL        &RTNMBR *CHAR LEN(10)
             ADDUNQMBR  FILE(xxx) TEXT('xxx') RTNMBR(&RTNMBR)

The  file must allow for  multiple members.  When  the file is created,
specify MBR(*NONE).   The first use  of ADDUNQMBR will  add the  member

If multiple jobs attempt  to add a unique member at the  same time, the
command  monitors for the member  being in existence and  retries up to
5 times to add a unique member.

You should not attempt to  add your own member  of the file outside  of
ADDUNQMBR unless you strictly follow the naming convention.

Cleaning out old members

You must periodically  clean out old  members that are no  longer being
used.   There is a maximum of  32,767 members that may exist  in a file
at  one time.   See the tool  RMVOLDMBR for how  to remove members that
have existed for n days.

Exceeding UNQ9999999

If  member UNQ9999999  exists,  you  cannot  add another  member.    An
escape message  will occur when  using ADDUNQMBR and you  will probably
need  to  remove  all  members  and  let  ADDUNQMBR  begin  again  with

ADDUNQMBR escape messages you can monitor for

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

ADDUNQMBR Command parameters                          *CMD

   FILE          The qualified  name  of  the  file  to  add  a  unique
                 member  name  to.    The  library  value  defaults  to
                 *LIBL.   A  specific library  or  *CURLIB may  also be

                 The file must be  specified to allow multiple  members
                 if more than one exists.

   TEXT          The text description assigned to the new member.

   RTNMBR        The name of  the unique member  that was added  to the
                 file.   Member names are assigned  as UNQnnnnnnn where
                 nnnnnnn is a number from 1 to 9,999,999.

                 This  is  an  optional return  variable  that  if used
                 must be specified as *CHAR LEN(10).

                 If no  members exist, the  first member  name will  be


Because ADDUNQMBR returns  a variable, the command may  only be used in
a CL program.


The following TAA Tools must be on your system:

     CHKOBJ3         Check object 3
     RSNLSTMSG       Resend last message
     RTVDBFA         Retrieve data base file attributes
     RTVVALA         Retrieve value of a variable
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message


None, the tool is ready to use.

Objects used by the tool

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

   ADDUNQMBR     *CMD                   TAADBLT       QATTCMD
   TAADBLTC      *PGM       CLP         TAADBLTC      QATTCL

Added to TAA Productivity tools January 1, 2008

Home Page Up to Top