TAA Tools
RTVLFA       RETRIEVE LOGICAL FILE ATTRIBUTES        TAADBFL

The  Retrieve Logical  File Attributes  command  may be  used  in a  CL
program to retrieve most of the attributes for a Logical file.

The command  executes the DSPFD command using a  file in QTEMP and then
returns the variables specified to the user program.

A  typical use of the command  is to test if the  file is a joined file
such as:

        DCL         &JOIN *CHAR LEN(1)
        .
        .
        RTVLFA      FILE(FILEX) JOIN(&JOIN)
        IF          (&JOIN *EQ Y) DO .....

The command  parameters may  be prompted  for  with the  command.   The
value in  the parenthesis for  each parameter describes the  length and
type  of  field to  be  specified in  your  CL program  to  receive the
parameter.

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

   FILE          The qualified  file  name.   The library  defaults  to
                 *LIBL.

   RTNLIB        An  optional return  variable  that  will contain  the
                 library  name where the  logical file was  found.  The
                 value may be helpful if  the logical file is  accessed
                 without a  specific library name.   If  specified, the
                 variable must be declared as *CHAR LEN(10).

   FILETYPE      An  optional  return variable  that  will contain  the
                 file  type specified for the  logical file.  The value
                 returned will  be *DATA  or *SRC.   If specified,  the
                 variable must be declared as *CHAR LEN(5).

   JOIN          An optional  return variable that will contain  a Y or
                 N  for whether the  file is a  join logical  file.  If
                 specified, the  variable  must be  declared  as  *CHAR
                 LEN(1).

   WAITFILE      An  optional return  variable  that  will contain  the
                 Wait File  value specified for the  logical file.  The
                 value returned  will be  a  number, *IMMED,  or  *CLS.
                 If specified, the  variable must be declared  as *CHAR
                 LEN(6).

   WAITRCD       An  optional  return variable  that  will contain  the
                 Wait  Record  value  specified for  the  logical file.
                 The  value returned  will  be  a  number,  *IMMED,  or
                 *NOMAX.   If specified, the variable  must be declared
                 as *CHAR LEN(6).

   LVLCHK        An  optional  return variable  that  will  contain the
                 Level Check  value  specified for  the  logical  file.
                 The  value  returned   will  be  *YES  or   *NO.    If
                 specified,  the  variable must  be  declared  as *CHAR
                 LEN(4).

   CRTDAT        An optional  return  variable that  will  contain  the
                 Create Date of  the logical file.  The  value returned
                 will  be  in  the  form  YYMMDD.   If  specified,  the
                 variable must be declared as *CHAR LEN(6).

   CRTTIM        An  optional  return  variable that  will  contain the
                 Create Time of the  logical file.  The  value returned
                 will  be  in  the  form  HHMMSS.   If  specified,  the
                 variable must be declared as *CHAR LEN(6).

   MBRS          An  optional  return variable  that  will  contain the
                 Number of  Members that  exist for  the logical  file.
                 If specified,  the variable must  be declared  as *DEC
                 LEN(5 0).

   MAXMBRS       An  optional  return variable  that  will  contain the
                 Maximum number  of  Members  that can  exist  for  the
                 logical file.   The  value returned  will be a  number
                 or  *NOMAX.    If  specified,  the  variable  must  be
                 declared as *CHAR LEN(6).

   MAINT         An  optional  return  variable that  will  contain the
                 Maintenance  value specified  for  the  logical  file.
                 The value  returned will  be *IMMED, *REBLD,  or *DLY.
                 If  specified, the variable must  be declared as *CHAR
                 LEN(6).

   RECOVER       An optional  return  variable that  will  contain  the
                 Access Path  Recovery value specified for  the logical
                 file.   The value  returned will be  *IPL, *AFTIPL, or
                 *NO.  If specified, the  variable must be declared  as
                 *CHAR LEN(7).

   FMTSLR        An  optional return  variable  that will  contain  the
                 Format  Selector  program  specified for  the  logical
                 file.   If  specified, the  variable must  be declared
                 as *CHAR LEN(10).

   FMTSLRLIB     An  optional return  variable  that will  contain  the
                 library where  the Format Selector  program exists for
                 the  logical file.   If  specified, the  variable must
                 be declared as *CHAR LEN(10).

   MAXKEYLEN     An optional  return  variable that  will  contain  the
                 Maximum  Key length  specified for  the logical  file.
                 If  specified, the variable  must be  declared as *DEC
                 LEN(3 0).

   MAXRCDLEN     An optional  return  variable that  will  contain  the
                 Maximum  Record  length  specified   for  the  logical
                 file.   If  specified, the  variable must  be declared
                 as *DEC LEN(5 0).

   FRCRATIO      An  optional  return  variable that  will  contain the
                 Force Ratio  specified  for  the logical  file.    The
                 value  returned  will  be  a  number  or  *NONE.    If
                 specified,  the  variable must  be  declared  as *CHAR
                 LEN(5).

   NBRFMTS       An optional  return  variable that  will  contain  the
                 Number  of Formats  specified  for  the logical  file.
                 If  specified, the variable  must be  declared as *DEC
                 LEN(5 0).

   FRCACCPTH     An  optional   return  variable   that  will   contain
                 whether the  access path  is forced.   A  *YES or  *NO
                 will  be returned.   If  specified, the  variable must
                 be declared as *CHAR LEN(4).

   SRTSEQ        An  optional  return  variable that  will  contain the
                 sort  sequence  of  the  file.     If  specified,  the
                 variable must be declared as *CHAR LEN(10).

   SRTSEQLIB     An  optional return  variable  that  will contain  the
                 library   of  the  sort  sequence   table  name.    If
                 specified, the  variable  must be  declared  as  *CHAR
                 LEN(10).

   LANGID        An  optional return  variable  that  will contain  the
                 Language ID  assigned to the file.   If specified, the
                 variable must be declared as *CHAR LEN(10).

   TEXT          An optional  return  variable that  will  contain  the
                 Text description specified  for the logical file.   If
                 specified,  the  variable must  be  declared as  *CHAR
                 LEN(50).

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

Because  the  tool returns  variables,  it can  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
   ------        -----      ---------      ----------     -----------

   RTVLFA        *CMD                      TAADBFL        QATTCMD
   TAADBFLC      *PGM          CLP         TAADBFLC       QATTCL
					

Added to TAA Productivity tools April 1, 1995


Home Page Up to Top