TAA Tools
RTVFMT          RETRIEVE FORMAT                        TAADBIM

The Retrieve  Format command retrieves  information about the  first or
a  named  format  in  a data  base  file.    Only  the  header type  of
information  is retrieved  such as  the format  text, format  name, and
number of  fields.   For detail  field information,  see the  RTVFLDARR
tool.

A typical  command to retrieve the  format name of the  first format in
a data base file would be:

             DCL       &RTNFMT *CHAR LEN(10)
              .
             RTVFMT    FILE(xxx) RTNFMT(&RTNFMT)

For  physical files  and single  format logical  files, the  default of
FORMAT(*FIRST) may be used.

If a logical file has  multiple formats, information about the  formats
beyond  the first  format  can only  be retrieved  if  you specify  the
format name.

The API QDBRTVFD is used to retrieve the information.

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

   FILE          The  qualified  name  of  the  data  base file.    The
                 library value  defaults to  *LIBL.   *CURLIB may  also
                 be used.

   FORMAT        The  format name  to  be retrieved.    The default  is
                 *FIRST  which may be  used for  a physical file  or to
                 obtain  information about the first  or only format of
                 a logical file.

   RTNLIB        An  optional  return  variable  for  where   the  file
                 exists.  This  may be of value if  *LIBL or *CURLIB is
                 used  for the qualified  library name.   If specified,
                 the variable must be declared as *CHAR LEN(10).

   RTNFMT        An optional  return  variable  for  the  name  of  the
                 format.   This may  be of  value if FORMAT(*FIRST)  is
                 used.   If  specified, the  variable must  be declared
                 as *CHAR LEN(10).

   RCDLEN        An optional return variable  for the record length  of
                 the  format.    If specified,  the  variable  must  be
                 declared as *DEC LEN(5 0).

   NBRFLDS       An optional  return variable for the  number of fields
                 in  the format.   If  specified, the  variable must be
                 declared as *DEC LEN(5 0).

   LVLID         An  optional   return  variable  for   the  level   ID
                 assigned to  the format.   If specified,  the variable
                 must be declared as *CHAR LEN(13).

   TEXT          An  optional return variable  for the text description
                 of the format.   If  specified, the  variable must  be
                 declared as *CHAR LEN(50).

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

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

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

None.

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

None, the tool is ready to use.

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

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

   RTVFMT        *CMD                   TAADBIM       QATTCMD
   TAADBIMC      *PGM       CLP         TAADBIMC      QATTCL
					

Added to TAA Productivity tools January 1, 1998


Home Page Up to Top