TAA Tools
RTVCURMBR       RETRIEVE CURRENT MEMBER                TAADBKJ

The Retrieve  Current Member  command retrieves  information about  the
newest member (or  generic member) in a data base  file.  This is based
on  the  create date/time  of the  members.   RTVCURMBR may  be helpful
when you want to process the  most current member of a file and  do not
know the name of the member.

A typical command would be:

             DCL        &CURMBR *CHAR LEN(10)
              .
             RTVCURMBR  FILE(xxx) CURMBR(&CURMBR)

The  newest member of  the file  based on  the member  create date/time
would be returned in &CURMBR.

RTVCURMBR escape messages you can monitor for
---------------------------------------------

      TAA9891    The file does not exist
      TAA9892    The file has no members
      TAA9893    The file has no members for the specified mbr name

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

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

   FILE          The  qualified  name  of  the  file  to  retrieve  the
                 current member  for.   The library  value defaults  to
                 *LIBL.  *CURLIB may also be used.

   MBR           The member  name to search for.   The default  is *ALL
                 meaning all members in the file will be searched.

                 A  generic  name may  be  entered to  search  only the
                 members that match the specific name.

                 A specific member  name may be  entered to search  for
                 only that member.   While this function  is supported,
                 the use of RTVMBRD would be preferred.

   CURMBR        The  current  member   in  the  file/member  specified
                 based  on the  create date/time  of the  member.  This
                 is an optional  return variable that  if used must  be
                 specified as *CHAR LEN(10).

   MBRTXT        The  text associated  with the  current member.   This
                 is  an optional return  variable that if  used must be
                 specified as *CHAR LEN(50).

   CRTDATE       The create date of the  current member in the  CYYMMDD
                 format.  This  is an optional return  variable that if
                 used must be specified as *CHAR LEN(7).

   CRTTIME       The  create time of  the current member  in the HHMMSS
                 format.  This is an  optional return variable that  if
                 used must be specified as *CHAR LEN(6).

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

Because RTVCURMBR  returns values, the  command may only  be used in  a
CL program.

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

The following TAA Tools must be on your system:

     RTVMBRLST2      Retrieve member list 2
     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
   ------        ----    ---------      ----------    ----------

   RTVCURMBR     *CMD                   TAADBKJ       QATTCMD
   TAADBKJC      *PGM       CLP         TAADBKJC      QATTCL
					

Added to TAA Productivity tools January 15, 2004


Home Page Up to Top