TAA Tools

The  Create  Logical  File  Source  command  provides  a  solution  for
creating simple  LF type source and creating the  file.  The command is
intended for two uses:

  **   You  want a  simple logical  file over  a single  physical file.
       You want  the format  of the  physical to  be used  and want  to
       specify one or more key fields.

  **   The  logical  file you  want  to  create  is more  complex  than
       described  above, but you  want the  command to give  you a 'leg
       up' in creating  the source.   You will then  use SEU to  modify
       the DDS source.

A typical command would be entered as:

                         TEXT('Logical over FILEA in CUST seq')

The logical  file must  be created  in the same  library as  the PFILE.
The  LFILE parameter allows  a qualified  library name and  the default
is *PFILELIB.   If the  default is specified,  CRTLFSRC determines  the
library for the logical file by finding where the PFILE exists.

CRTLFSRC ensures that a  file of the same name as  the proposed logical
file does  not exist.  It  also ensures that the member  does not exist
in the source file.

The  record format  name is  then accessed from  the physical  file.  A
member is added  to the source file  and the DDS source  statements are
written to  the file.  The TEXT  value is written as  the first comment
in  the file  and also  becomes the  text of the  member.   The logical
file is then created in the specified library.

Note that  CRTLFSRC  cannot be  used to  replace  an existing  file  or
source member.   It can only  be used for  a new source member  and new

If the  CRTLF command fails, the member that  was added is removed from
the source file.

Command parameters                                    *CMD

   LFILE         The  qualified  name  of   the  logical  file  to   be
                 created.      The  library   qualifier   defaults   to

                 If  *PFILELIB  is specified,  the  physical file  must
                 exist on the library list.

                 CRTLFSRC  can only  be used  to create  a logical file
                 in the  same  library  as the  physical  file.   If  a
                 specific  library is  named,  the  physical file  must
                 exist in that library.

   PFILE         The  name of the  physical file that  the logical file
                 should be  based on.    The file  must be  a  physical
                 file.  The  format name used in the  file is extracted
                 and used in the DDS record statement.

   KEYFLD        A list  of the key fields to  be specified.  *NONE may
                 be specified  to  create an  arrival  sequence  access
                 path.   If the fields  described do  not exist in  the
                 file  and you  have requested  to  create a  file, the
                 CRTLF   command  will  fail.     The  command  assumes
                 ascending sequence key  fields will be  used.  If  you
                 want   descending  sequence,   you  must   modify  the
                 generated DDS.  Up to 40 key fields may be named.

   WAITRCD       The  number of seconds to wait  if a record is locked.
                 The  default  is  5  which  differs  from  the  system
                 default of 60.

                 A decimal  value may be  entered between 0  and 99999.
                 The  special values  *NOMAX or  *IMMED may  be entered
                 which have the same meanings as on CRTLF.

   SRCFILE       The qualified  file  name of  the  source file  to  be
                 used.   QDDSSRC  is the  default.   The library  value
                 defaults to *LIBL.  *CURLIB may also be specified.

                 A member  of the LFILE  name must not exist.   It will
                 be  added with  a type LF  and the text  from the TEXT

   TEXT          The TEXT  of the  logical file  and the  member.   The
                 text  is  also  written  as  a comment  in  the  first
                 statement  written   to  the  source  member  to  help
                 describe the source.

   CRTLF         A *YES/*NO  parameter  that determines  if  a  logical
                 file  will be  created.   The  default  is *YES  which
                 means  to create the  logical file  from the generated
                 source in the current library.

   DLTSPLF       A  *YES/*NO  value  for   whether  the  spooled   file
                 generated from  CRTLF will  be deleted.   The  default
                 is  *NO meaning  the  spooled file  will  still exist.
                 If  *YES  is  specified,  the  spooled  file  is  only
                 deleted if the  logical file is  successfully created.


The  logical file  can  only be  created  in the  same  library as  the
physical file.


The following TAA Tools must be on your system:

     EXTLST       Extract list
     RTVFMT       Retrieve format
     SNDCOMPMSG   Send completion message
     SNDESCMSG    Send escape message
     SNDSTSMSG    Send status message
     WRTSRC       Write source


None, the tool is ready to use.

Objects used by the tool

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

   CRTLFSRC      *CMD                   TAADBHD       QATTCMD
   TAADBHDC      *PGM       CLP         TAADBHDC      QATTCL

Added to TAA Productivity tools May 1, 1996

Home Page Up to Top