TAA Tools
FIXALLSRC       FIX ALL SOURCE                         TAASRFQ

The Fix  All Source command  provides a method  of making mass  changes
to member  data in a source file  based on a 'From value'  found in the
source.    Any  type  of  source  is  valid  to  be  changed.   Because
ACTION(*CHECK) is  the  default, no  changes will  be  made allowing  a
review of what would be made by ACTION(*CHANGE).

Obviously, FIXALLSRC  can make  a mess  of your source  if you  are not
careful.   Be sure to use ACTION(*CHECK)  first and review what changes
will occur.

The  source  is  not  reformatted  so  you  cannot  effectively  change
keyword values  in CL source  to a longer  length value.   For example,
you  could not change  the keyword form  of the value  FILEA to FILEABC
without causing invalid syntax in CL source.

You must have *CHANGE authority to the source file being changed.

A typical example  of where  FIXALLSRC can be  helpful is  if you  have
misspelled a  file name in  several source members.   Assume you  named
the  file PAYRULL  in one  or more  members and  it should  be PAYROLL.
You could enter:

             FIXALLSRC  SRCFILE(QCLSRC) FROMVAL(PAYRULL)
                          TOVAL(PAYROLL) ACTION(*CHECK)

A  listing would  be displayed of  all source  statements where PAYRULL
was found and  what the new  statement would look  like with the  value
PAYROLL.

If you  have text  members where you  have several misspellings  of the
word 'elephant' as 'elephanz', you could change them with:

             FIXALLSRC  SRCFILE(QTXTSRC) FROMVAL('elephanz')
                          TOVAL('elephant') ACTION(*CHANGE)

Entering  the values in quotes  causes a scan and  replace of the lower
case values.

It is possible to change from a  longer name to a shorter name such  as
FILEABC should be changed  to FILEA by using the  ADDBLK keyword with a
value  of 2  meaning  2 additional  blanks should  be added  to  the To
value.  In  CL source  even with  keywords, most of  the changes  would
make valid source such as 'FILE(FILEA  )'.

Additional comments
-------------------

If the  From  Value is  found beyond  position  76, the  data shown  is
shifted to the left by 20 positions from where the value was found.

If inserting  the To value exceeds the length  of the source statement,
the data is just truncated.

There  is  very little  checking performed  by the  FIXALLSRC function.
You can easily  cause a  change to create  invalid statements.   Source
files up to a length of 240 may be used.

FIXALLSRC escape messages you can monitor for
---------------------------------------------

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

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

   SRCFILE       The  qualified name  of the  source file  to  check or
                 make  changes  to.    The  library  value  defaults to
                 *LIBL.   A specific  library or  *CURLIB  may also  be
                 used.

   FROMVAL       The From  Value to search the  source for.   To search
                 for  a lower  case value, enter  the value  in quotes.
                 Up to 20 bytes may be entered.

   TOVAL         The To  Value to  be  used in  making  a change.    To
                 change  to a  lower  case value,  enter  the value  in
                 quotes.  Up to 20 bytes may be entered.

   ADDBLK        The  number of  blanks to  be added  to the  length of
                 the  To  value.   This  allows  you to  change  a From
                 Value  such  as  FILEABC  to  FILEA  by  specifying  2
                 additional blanks be added to the To value.

                 If  a value  is  entered, it  must  be in  a range  of
                 0-19.   The length of the To  value plus the number of
                 blanks cannot exceed 20.

   MBR           The name  of  the  member,  or generic  member  to  be
                 searched  in the  source file.   The  default is  *ALL
                 for all source members in the file.

   TYPE          The  source  type  to  be  searched.   Typical  source
                 types such as  PF, RPG, or  TXT may be  entered.   The
                 default is *ALL for all source types.

   ACTION        The action to be performed.

                 *CHECK is  the default meaning  the listing  will only
                 describe what would be changed by ACTION(*CHANGE).

                 *CHANGE   may  be  specified   to  cause   the  source
                 statements to be changed.

   OUTPUT        How  to  output  the results.    * is  the  default to
                 display the  spooled file  if the  command is  entered
                 interactively.   If the  display is ended  with F3/F12
                 or  the Enter key,  the spooled file  is deleted after
                 it is  displayed.   To retain  the  spooled file,  you
                 may use the  the System Request 'Cancel'  function and
                 the spooled file will exist in a HLD status.

                 If  the  command  is entered  in  batch  or *PRINT  is
                 specified, the spooled  file is  output and  retained.


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

You must have *CHANGE authority to the source file.

There is  no reformatting performed  on any changes.   The To  value is
just moved to the source where the From value was found.

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

The following TAA Tools must be on your system:

     CHKOBJ3         Check object 3
     CVTMBRLST       Convert member list
     HLRMVMSG        HLL Remove message
     RSNLSTMSG       Resend last message
     RTVDAT          Retrieve date
     RTVDBFA         Retrieve data base file attributes
     RTVSYSVAL3      Retrieve system value 3
     RTVVALA         Retrieve value attributes
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   FIXALLSRC     *CMD                   TAASRFQ       QATTCMD
   TAASRFQC      *PGM       CLP         TAASRFQC      QATTCL
   TAASRFQR      *PGM       RPG         TAASRFQR      QATTRPG
					

Added to TAA Productivity tools January 15, 2014


Home Page Up to Top