TAA Tools
FIXSRCDAT       FIX SOURCE DATE                        TAASRED

The Fix  Source Date  command checks  for invalid dates  in the  SRCDAT
field  of source  members.   Only the  YYMMDD format  should exist.   A
single  member, generic members,  or all members can  be checked in one
or all files  in a  library.  A  listing occurs  of any invalid  dates.
An update option exists to to change the dates to valid dates.

SEU  statement dates  are 6  characters and  should exist  in  a YYMMDD
format.   Invalid  dates may exist  due to  such conditions  as an APAR
situation which occurred  several years ago.   Or the  source data  may
be written from  a program with an  incorrect date or blanks  or zeros.

A typical command would be:

             FIXSRCDAT    SRCFILE(*ALL) LIB(xxx) MBR(*ALL)
                            OPTION(*CHECK)

All  members in  all source  files  in the  specified library  would be
checked.  If  any dates in  the source statements were  in error,  they
would appear on  the listing.  The  date that would be  assigned (based
on other command parameters) would be shown.

If  some source  statements appear,  you may  want  to correct  them by
using the same command with OPTION(*UPDATE).

You  can specify the same date be used  to replace any invalid dates or
the default of *CALC which means:

  **   If blanks  or  all  zeros exist,  the  member creation  date  is
       used.

  **   If an invalid  date exists, you can rearrange  the date based on
       the  BADDATFMT parameter.    This defaults  to *MDY  meaning the
       date in the records is in MMDDYY format.

An option exists to bypass blank and zero values.

The check to determine if a  bad date exists ensures valid digits,  but
only  checks that  the  month be  between  01 and  12  and  the day  be
between 01 and 31.

FIXSRCDAT  escape messages you can monitor for
----------------------------------------------

      TAA9894    You do not have proper authority to the file
      TAA9897    No source files exist in the library
      TAA9896    More than 999 source files exist in a library

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

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

   SRCFILE       The  source file to be  scanned.  The  default is *ALL
                 meaning all source files found in the library.

                 *STD may  be entered  to mean  all the  system  source
                 files such as  QCLSRC and QRPGSRC.   For a  listing of
                 these, use the PRTSRCTYP tool.

                 *SRC1,  *SRC2, and *SRC3  mean that  a data  area must
                 exist  on the library list  by the corresponding names
                 of SRCLST1, SRCLST2,  and SRCLST3.   These data  areas
                 must  contain  the name  of  the  source  files to  be
                 checked.   Only source files that  exist and match one
                 of those  found in  the data  area  will be  returned.
                 See the discussion with the CRTSRCFLST tool.

                 *QATT may  be entered  to mean  the source  files used
                 by  the   TAA  Productivity  Tools.    *QATT2  may  be
                 entered to  mean all  the  QATTxxx source  file  names
                 that  exist in  QUSRTOOL.   Use  the PRTQATTF  command
                 for a list of the files.

   LIB           The  library   containing  the  source   files.    The
                 default  is  *DFT meaning  the  current library  if it
                 exists  and if  not  the  first library  on  the  user
                 portion of the library list is used.

   MBR           The member to  be processed.  The default  is *ALL for
                 all  members in a file.  A  specific name or a generic
                 name may also be entered.

   OPTION        The type  of  processing to  occur.   The  default  is
                 *CHECK which  means that  only a  listing will  occur.
                 Only  the statements  in error  will  be listed.   The
                 'NewDat' column will describe  the date that would  be
                 assigned based on other options.

                 *UPDATE may be  entered to cause both the  listing and
                 updating of  the existing source  to occur.   Only the
                 statements   with   invalid  source   dates   will  be
                 changed.

   BYPBLANKS     Whether to  bypass  dates that  are blanks  or  zeros.
                 The default  is *NO  meaning the dates  are considered
                 invalid.

                 If  *YES   is  specified,  blank  or  zero  dates  are
                 considered valid.

   NEWDATE       The new date to be  assigned to any source  statements
                 that have invalid dates.

                 The default  is *CALC which means  1) If the  date has
                 invalid  data, blanks,  or zeros, the  member creation
                 date is  used or  2) if  an invalid  date exists,  the
                 date  is   rearranged  according   to  the   BADDATFMT
                 parameter.

                 A specific  date may be entered (in  job format) to be
                 assigned  to any  statements that  have invalid dates.

                 *CURRENT may be specified to use the current date.

                 The check to  determine if a  bad date exists  ensures
                 valid  digits,  but  only  checks that  the  month  be
                 between  01 and 12 and  the day be between  01 and 31.

   BADDATFMT     The format  of the  bad  date.   The default  is  *MDY
                 meaning the  bad dates  exist in  MMDDYY format.   The
                 date  in  the source  statement is  rearranged  to the
                 standard SEU format of YYMMDD.

                 *DMY may be entered if  the bad dates exist in  DDMMYY
                 format.    The   date  in  the  source   statement  is
                 rearranged to the standard SEU format of YYMMDD.

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

You must have *CHANGE authority to the file to use OPTION(*UPDATE)

Prerequisites
-------------

The following TAA Tools must be on your system:

     CHKOBJ3         Check object 3
     EDTVAR          Edit variable
     HLRMVMSG        HLL Remove messages
     RTVDAT          Retrieve date
     RTVLIBSRCF      Retrieve library source files
     RTVMBRLST       Retrieve member list
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCMSG       Send escape message
     SNDSTSMSG       Send status message

Implementation
--------------

None, the tool is ready to use.

Objects used by the tool
------------------------

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

   FIXSRCDAT     *CMD                   TAASRED       QATTCMD
   TAASREDC      *PGM       CLP         TAASREDC      QATTCL
   TAASREDR      *PGM       RPG         TAASREDR      QATTRPG
					

Added to TAA Productivity tools September 1, 1999


Home Page Up to Top