TAA Tools

The  Retrieve Logical  File Source  command  retrieves the  information
from  an existing logical  file object and  writes a DDS  source member
that  attempts  to emulate  the  original source  that  was used.   The
command has  several restrictions.   It  is limited  to simple  logical
files.   Key fields described for  the logical file are  written to the
DDS along with any select/omit criteria.

The major restrictions are:

  **   Only  single format logical files are  supported (join files are
       not supported).

  **   A member must exist for the logical file.

  **   English language  only (upper  or lower  case)  is supported  as
       DSPFFD printed output is used for certain field information.

A typical command would be entered as:

        RTVLFSRC    FILE(xxxx) TOSRCFILE(yyy)

This would  extract the information from  the named file and  write DDS
source statements to the specified source file.

Not all  of the functions can be retrieved.   Any comments are lost and
the source may not look as it was originally written.

Note that RTVLFSRC  should be viewed  as a 'best  effort' solution  and
not as a guarantee that the existing object can be duplicated.

There are several reasons for using RTVLFSRC:

  **   You have lost your DDS source.

  **   A system or  vendor supplied file  object exists that  you would
       like the source for.

Field information retrieved

If  DSPFFD is used  for a logical  file, all  fields in the  format are
displayed.   When RTVLFSRC is  run, it compares the  format level ID of
the based  on  physical file  to the  format level  ID  of the  logical
file.   If they are the  same, the individual fields  within the format
are not output to the DDS.

If  the  formats differ,  all  fields in  the logical  file  format are
output to the DDS.

RTVLFSRC escape messages you can monitor for

      TAA9891    Error occurred based on the file attributes
                   - The text describes the error

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

RTVLFSRC Command parameters                           *CMD

   FILE          The qualified  name of  the logical  file to  retrieve
                 from.  The library defaults to *LIBL.

   TOSRCFILE     The qualified  name of  the source  file to write  DDS
                 output.   The file  must exist.   The library defaults
                 to *LIBL.

   TOMBR         The member  in  the  source  file  to  write  the  DDS
                 source to.   The default is  *FILE meaning to  use the
                 same name as the FILE retrieved from.

   REPLACE       A *YES/*NO  option that determines if  the member will
                 be cleared before writing source.

                 *NO   specifies  that   the  member   named  in  TOMBR
                 parameter must not exist in the source file.

                 *YES specifies  that  if  the member  exists,  replace
                 the  data  (CLRPFM  is   used  before  retrieving  the


  **   Only  single format logical files are  supported (join files are
       not supported).

  **   A member must exist for the logical file.

  **   English language only is supported.

  **   Certain keywords such as CONCAT  to create a logical file  field
       are either not supported or partially supported.


The following TAA Tools must be on your system:

     RTVDBFA         Retrieve data base file attributes
     RTVFMT          Retrieve format
     RTVLFMD         Retrieve logical file member description
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message
     SNDSTSMSG       Send status message


None, the tool is ready to use.

Objects used by the tool

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

   RTVLFSRC      *CMD                   TAADBMJ       QATTCMD
   TAADBMJC      *PGM       CLP         TAADBMJC      QATTCL
   TAADBMJR      *PGM       RPG         TAADBMJR      QATTRPG

Added to TAA Productivity tools July 15, 2009

Home Page Up to Top