TAA Tools
RTVPFA       RETRIEVE PHYSICAL FILE ATTRIBUTES        TAADBFG

The Retrieve  Physical  File Attributes  command may  be used  in a  CL
program to retrieve most of the attributes for a Physical 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 being
journaled such as:

        DCL         &JRNLING *CHAR LEN(1)
        .
        .
        RTVPFA      FILE(FILEX) JRNLING(&JRNLING)
        IF          (&JRNLING *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.

A second  command  RTVPFA2  is  also provided  because  of  the  system
limitation of 40 parameters.

RTVPFA 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 physical  file was found.   The
                 value  may  be   helpful  if  the  physical   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 physical  file.    The
                 value  returned will be *DATA or  *SRC.  If specified,
                 the variable must be declared as *CHAR LEN(5).

   EXTDSC        An optional  return  variable that  will  contain  the
                 Externally   Described   value   specified   for   the
                 physical  file.   The value returned  will be  *YES or
                 *NO.  If specified, the  variable must be declared  as
                 *CHAR LEN(4).

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

   ACCPTH        An  optional  return  variable that  will  contain the
                 type of  Access Path  used for  the file.   The  value
                 returned  will  be  K   (Key)  or  A  (Arrival).    If
                 specified,  the  variable must  be  declared  as *CHAR
                 LEN(1).

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

   WAITFILE      An  optional  return variable  that  will  contain the
                 Wait File  value  specified  for  the  physical  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 physical  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 physical  file.
                 The  value   returned  will  be  *YES   or  *NO.    If
                 specified, the  variable  must be  declared  as  *CHAR
                 LEN(4).

   ALWDLT        An  optional return  variable  that will  contain  the
                 Allow  Delete value specified  for the  physical file.
                 The   value  returned  will  be   *YES  or  *NO.    If
                 specified, the  variable  must  be declared  as  *CHAR
                 LEN(4).

   ALWUPD        An  optional return  variable  that  will contain  the
                 Allow  Update value  specified for the  physical file.
                 The  value  returned  will  be   *YES  or  *NO.     If
                 specified,  the variable  must  be  declared as  *CHAR
                 LEN(4).

   INLRCDS       An  optional  return variable  that  will  contain the
                 Initial Number of Records  specified for the  physical
                 file.    The  value  returned  will  be  a  number  or
                 *NOMAX.   If specified, the variable  must be declared
                 as *CHAR LEN(10).

   INCRCDS       An  optional  return  variable that  will  contain the
                 Increment  Number   of  Records   specified  for   the
                 physical  file.   If specified,  the variable  must be
                 declared as *DEC LEN(5 0).

   MAXINC        An  optional  return variable  that  will  contain the
                 Maximum  Number  of   Increments  specified  for   the
                 physical file.   If  specified, the  variable must  be
                 declared as *DEC LEN(5 0).

   CRTCEN        An  optional  return variable  that  will  contain the
                 Create  Century  value  specified  for  the   physical
                 file.   If specified,  the variable  must be  declared
                 as *CHAR LEN(1).

   CRTDAT        An  optional  return variable  that  will contain  the
                 Create  Date  value specified  for the  physical 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  value specified  for the  physical  file.
                 The value  returned will  be in the  form HHMMSS.   If
                 specified,  the  variable must  be  declared  as *CHAR
                 LEN(6).

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

   CONTIG        An  optional return  variable  that will  contain  the
                 Contiguous  Space  value  specified for  the  physical
                 file.   The value  returned will be  *YES or  *NO.  If
                 specified, the  variable  must be  declared  as  *CHAR
                 LEN(4).

   UNIT          An  optional return  variable  that  will contain  the
                 Preferred   Storage  Unit  value   specified  for  the
                 physical file.   If  specified, the  variable must  be
                 declared as *CHAR LEN(6).

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

   DLTPCT        An  optional return  variable  that  will contain  the
                 Delete  Percentage  specified for  the  physical file.
                 The value returned  will be *NONE  or a number  1-100.
                 If specified, the  variable must be declared  as *CHAR
                 LEN(5).

   MBRS          An  optional  return variable  that  will  contain the
                 number of members  that exist for  the physical  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
                 physical 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  physical  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
                 physical  file.   The  value  returned  will be  *IPL,
                 *AFTIPL,  or *NO.  If  specified, the variable must be
                 declared as *CHAR LEN(7).

   RCDCAP        An optional  return  variable  that will  contain  the
                 Record  Capacity  value  specified  for  the  physical
                 file.   If  specified, the  variable must  be declared
                 as *DEC LEN(10 0).

   JRNLING       An optional  return  variable that  will  contain  the
                 Journaling  indication  specified   for  the  physical
                 file.    The  value  returned will  by  Y  or  N.   If
                 specified, the  variable  must be  declared  as  *CHAR
                 LEN(1).

   JRN           An  optional return  variable  that will  contain  the
                 Journal   specified  for  the   physical  file.     If
                 specified,  the  variable  must be  declared  as *CHAR
                 LEN(10).

   JRNLIB        An  optional return  variable  that will  contain  the
                 library  used  for  the   Journal  specified  for  the
                 physical  file.   If specified,  the variable  must be
                 declared as *CHAR LEN(10).

   IMAGES        An optional  return  variable that  will  contain  the
                 type  of Journal  Images  specified  for the  physical
                 file.   The  value returned will  be *AFTER  or *BOTH.
                 If specified, the variable  must be declared as  *CHAR
                 LEN(6).

   JRNDAT        An  optional return  variable  that will  contain  the
                 date  that  Journaling was  started  for the  physical
                 file.    The  value  returned  will  be  in  the  form
                 YYMMDD.  If specified,  the variable must be  declared
                 as *CHAR LEN(6).

   JRNTIM        An  optional return  variable  that  will contain  the
                 time  that  Journaling was  started  for  the physical
                 file.    The  value  returned  will  be  in  the  form
                 HHMMSS.  If  specified, the variable must  be declared
                 as *CHAR LEN(6).

   OMTJRNE       An   optional  return   variable  that   will  contain
                 whether  to  omit  certain  Journal  entries  for  the
                 physical file.   The value  returned will be  *NONE or
                 *OPNCLS.     If  specified,   the  variable   must  be
                 declared as *CHAR LEN(7).

   REUSEDLT      An  optional  return  variable that  will  contain the
                 Reuse  Delete Records  value  for the  physical  file.
                 The  value   returned  will  be  *YES  or   *NO.    If
                 specified,  the  variable must  be  declared  as *CHAR
                 LEN(4).

   MAXDLTPCT     An optional  return  variable that  will  contain  the
                 maximum  deleted  record  percentage.    A  number  or
                 *NONE  will be returned.   If  specified, the variable
                 must be declared as *CHAR LEN(5).

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

RTVPFA2 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 physical file was  found.  The
                 value   may  be  helpful  if   the  physical  file  is
                 accessed  without  a  specific   library  name.     If
                 specified,  the variable  must  be  declared as  *CHAR
                 LEN(10).

   SRTSEQ        An  optional  return variable  that  will  contain the
                 value specified on  the CRTPF command  for the  SRTSEQ
                 parameter.    If  specified,  the   variable  must  be
                 declared as *CHAR LEN(10).

   SRTSEQL       An  optional  return variable  that  will contain  the
                 value   specified  on   the  CRTPF   command  for  the
                 qualified  name   of   the  SRTSEQ   parameter.     If
                 specified,  the variable  must  be  declared as  *CHAR
                 LEN(10).

   LANGID        An  optional  return variable  that  will  contain the
                 value specified on  the CRTPF  command for the  LANGID
                 parameter.    If  specified,   the  variable  must  be
                 declared as *CHAR LEN(10).

   NBRCONS       An  optional  return variable  that  will  contain the
                 number of  constraints specified  for  the file.    If
                 specified,  the  variable must  be  declared  as  *DEC
                 LEN(5 0).

   NBRTRGS       An  optional  return variable  that  will contain  the
                 number  of  triggers  specified  for  the  file.    If
                 specified,  the variable  must  be  declared  as  *DEC
                 LEN(5 0).

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

Because the  commands return variables, they  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
   ------        -----      ---------      ----------     -----------

   RTVPFA        *CMD                      TAADBFG        QATTCMD
   RTVPFA2       *CMD                      TAADBFG2       QATTCMD
   TAADBFGC      *PGM          CLP         TAADBFGC       QATTCL
   TAADBFGC2     *PGM          CLP         TAADBFGC2      QATTCL
					

Added to TAA Productivity tools April 1, 1995


Home Page Up to Top