TAA Tools

The Retrieve  Physical File  Source command  retrieves the  information
from an  existing physical file object and writes  a DDS source member.

A typical command would be entered as:

        RTVPFSRC    FILE(xxxx) TOSRCFILE(yyy)

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

Because the tool must  read a spooled version  of DSPFD, it is  limited
to English only.

Not all of  the functions can be retrieved.  Any  comments are lost and
the  source will not look as  you had originally written  it.  There is
a specific option for how  field references should be handled (see  the
later discussion).  See also the section on restrictions.

Note that  RTVPFSRC should be  viewed as  a 'best effort'  solution and
not  as a  guarantee that the  existing object  can be duplicated.   In
general, it  does  a  good  job and  retrieves  the  vast  majority  of
keywords  including the  validity checking  information  (e.g.   RANGE)
which is not used by the data base function.

There are several reasons for using RTVPFSRC:

  **   You have lost your DDS source.

  **   A system  or vendor supplied  file object exists  that you would
       like  the source for.  For  example, the system supplies several
       model outfiles in object  form, but does not supply  the source.
       Having  the  source  may  allow  you to  modify  the  files  for
       specific application needs.

  **   You  have an application  where you want  to add a  field when a
       duplicate file is created.   A typical function would be to  add
       a new field at  the end of the retrieved DDS using  the TAA tool
       WRTSRC and then recreate the file.

Field reference information

Note:  If  the  file  being retrieved  from  does  not  have any  field
references, this subject can be bypassed.

It is normal  for many DDS  source members to  include references to  a
field reference  file  or other  fields in  the  same file.   When  the
object  is  created,  the  information  from  the  referenced  file  is
combined  with statements in the source.   For example, you can specify
that you want  the field  reference attributes except  that you want  a
different  length.  Specifying  a difference  from the  field reference
will be called an 'override' in this documentation.

The  object contains the information  on what file  and field were used
as the reference point, but does  not contain whether the final set  of
attributes  was  produced  from  the reference  file,  overrides  or  a
combination  of  both.    Only  the  final  set  of attributes  can  be
retrieved from the object form.

The FLDREF option  (on RTVPFSRC) allows  you to specify  an intent  for
how the retrieved source will be used.

The default  is *YES which  will attempt to  recreate the source  as it
was most likely originally specified.  The assumptions are:

  **   If  the field  name  is the  same  as the  referenced  name, any
       overrides  will be  lost.   The information  from the  object is

  **   If  the  field  name  differs  from  the  referenced  name,  the
       information from the  object will be used.   The field reference
       information  will exist  in the  source, but  all of  the object
       information is  provided as  an  override.   This means  if  you
       recreate  the object,  any changed  field reference  information
       would be lost.

If  FLDREF(*NO) is specified,  the source can  be used to  recreate the
existing  object.     If  you   had  specified   any  field   reference
information, it  will exist  in the  source, but all  of the  overrides
will  be used.   This  means if  you recreate  the object,  any changed
field reference information will be lost.

A  file  level  REF  keyword  will  be  generated  based  on  the  most
frequently named file.   This may  not be the  way the original  source
was keyed.

Command parameters                                    *CMD

   FILE          The qualified  name of the physical file  you want the
                 source  retrieved  from.    The  library  defaults  to

   TOSRCFILE     The qualified name  of the  source file  you want  the
                 output  written  to.    The  file  must  exist.    The
                 library defaults to *LIBL.

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

   REPLACE       A  *YES/*NO  option   that  defaults  to  *NO.     *NO
                 specifies  that the  member  named in  TOMBR  must not
                 exist  in  the source  file.   *YES specifies  that if
                 the member  exists, replace the  data (CLRPFM is  used
                 before retrieving the source).

   FLDREF        A  *YES/*NO  parameter that  defaults  to  *YES.   The
                 default  attempts to bring back  your source using the
                 original field  reference  specifications  so  that  a
                 recreate  will   use  any   changed  field   reference
                 information.    Assumptions  must  be  made for  *YES.
                 *NO means to extract the  source so that the  existing
                 object  will  be  recreated as  a  duplicate  and  any
                 changed field  reference information will  be ignored.

                 See the previous discussion on Field References.


  **   Because  the tool  must read a  spooled version of  DSPFD, it is
       limited to English only.

  **   The FORMAT keyword is lost.

  **   The ALTSEQ information is lost.

  **   See the Field Reference  information section on the handling  of
       Field References

  **   Any comments are lost.

  **   The format  of the source will  probably differ from  how it was
       originally  keyed.  The  sequence of keywords is  fixed and only
       the EDTCDE and EDTWRD keywords  will appear on the same line  as
       the field name.


The following TAA Tools must must be on your system:

     RTVPFA       Retrieve physical file attributes
     SNDCOMPMSG   Send completion message
     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
   ------        ----        ---------      ----------    ----------

   RTVPFSRC      *CMD                       TAADBFV       QATTCMD
   TAADBFVC      *PGM           CLP         TAADBFVC      QATTCL
   TAADBFVR      *PGM           RPG         TAADBFVR      QATTRPG

Added to TAA Productivity tools April 1, 1995

Home Page Up to Top