TAA Tools
RTVUSRIDXA      RETRIEVE USER INDEX ATTRIBUTES         TAAIDXC

The Retrieve  User Index  Attributes command  retrieves the  attributes
of  a user  index.   Any user  index may  be  retrieved from  (not just
those  created  by the  TAA CRTUSRIDX  command).   The QUSRUIAT  API is
used.

Retrieving a  user index  resets the  number of  retrieves kept  within
the object  (RTVS parameter) after the information  has been retrieved.
This  is caused by the the API  which resets the 'number of retrieves'.

A typical series of commands would be:

             DCL           &NBRCUR *DEC LEN(10 0)
              .
             RTVUSRIDXA    USRIDX(xxx) NBRCUR(&NBRCUR)

The number of current entries in the user index would be retrieved.

RTVUSRIDXA escape messages you can monitor for
----------------------------------------------

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

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

   USRIDX        The qualified  name  of  the user  index  to  retrieve
                 from.  The library defaults to *LIBL.

                 A specific library  or *CURLIB may also  be specified.

   RTNLIB        The  library where  the user index  exists.   This may
                 be helpful  if  a  special  value  was  used  for  the
                 qualified library  name.  This  is an  optional return
                 variable  that  if used  must  be  specified as  *CHAR
                 LEN(10).

   ENTLENA       The  entry length attribute.   The values returned are
                 *FIXED or *VAR.   This is an optional  return variable
                 that if used must be specified as *CHAR LEN(6).

   IMMEDUPD      Whether  an  immediate  update   should  occur.    The
                 return  values are *YES  or *NO.  This  is an optional
                 return variable  that if  used  must be  specified  as
                 *CHAR LEN(4).

   INSBYKEY      Whether  to insert  by  key.   The  return values  are
                 *YES  or *NO.   This  is  an optional  return variable
                 that if used must be specified as *CHAR LEN(4).

   OPTIMIZE      How to  optimize the  use of  the index.   The  return
                 values  are *RANDOM  or  *SEQ.   This  is an  optional
                 return  variable that  if  used must  be  specified as
                 *CHAR LEN(7).

   ENTLEN        The  length  of  an  entry.    For  fixed  length user
                 indexes,  this  will   be  the   same  value  as   for
                 MAXENTLEN.

                 For variable  length user indexes, this  is the length
                 of  the longest entry in  the user index.   This is an
                 optional  return  variable  that   if  used  must   be
                 specified as *DEC LEN(4 0).

   MAXENTLEN     The  maximum entry  length for  the user  index.   The
                 value  will be between 1  and 2000.   For fixed length
                 user indexes, this will be  the same value as  ENTLEN.
                 This  is an  optional  return  variable that  if  used
                 must be specified as *DEC LEN(4 0).

   KEYLEN        The  length of  the  key for  keyed indexes.    If the
                 index  is keyed, the  value will be  between 1 and the
                 MAXENTLEN.   If  the index  is  not keyed,  the  value
                 will be 0.   This is an optional  return variable that
                 if used must be specified as *DEC LEN(4 0).

   NBRCUR        The  number  of  current entries  in  the  user index.
                 This is  an  optional  return variable  that  if  used
                 must be specified as *DEC LEN(10 0).

   ADDS          The  number of  entries  that have  been  made to  the
                 user  index.   This  is  an  optional return  variable
                 that if used must be specified as *DEC LEN(10 0).

   RMVS          The number  of entries  that  have been  removed  from
                 the user index.   This is an optional  return variable
                 that if used must be specified as *DEC LEN(10 0).

   RTVS          The  number  of retrieval  operations  that have  been
                 made  to the  user index.   The  number is reset  to 0
                 whenever the  RTVUSRIDXA command or  the QUSRUIAT  API
                 is  used.  This  is an  optional return  variable that
                 if used must be specified as *DEC LEN(10 0).

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

Because  the command  returns variables, it  may only  be used  in a CL
program.

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

The following TAA Tools must be on your system:

     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
   ------        ----    ---------      ----------    ----------

   RTVUSRIDXA    *CMD                   TAAIDXC       QATTCMD
   TAAIDXCC      *PGM       CLP         TAAIDXCC      QATTCL
   TAAIDXCR      *PGM       RPGLE       TAAIDXCR      QATTRPG

Structure
---------

RTVUSRIDXA    Cmd
   TAAIDXCC     CL Pgm
     TAAIDXCR     RPG Pgm runs in *NEW activation group
					

Added to TAA Productivity tools June 15, 2004


Home Page Up to Top