TAA Tools
SRCCTL      SOURCE CONTROL FUNCTION                    TAASRCH

The Source Control function  allows you to create an  environment where
production source  files are controlled  in terms of  access and usage.
The function has the following advantages:

  **   Source  members  are  'checked  out'  of  the  production source
       files by  a  special command.    This prevents  two  programmers
       from  working on  the same  source member  by placing  a logical
       lock  on the member  until it  is 'checked in'.   The production
       source can only be changed in a controlled manner.

  **   Any changes  to  a production  source  member  are logged  to  a
       source  detail file  (an archive).    If a  member is  replaced,
       both  the  before and  after  images of  the  entire  member are
       recorded.  A previous  version can be be  easily retrieved if  a
       need exists.

  **   An  audit  trail is  kept  of  all  changes that  occur  to  the
       production source  so that the complete information  of who made
       the change and when it was made is readily available.

  **   Source   statements  can  be   any  length  up   to  228  bytes.
       Different length source  files may be  controlled with the  same
       set of source  control files.  For example,  both 92 byte source
       files  (80 bytes  of source)  and 112 byte  source files  can be
       contained in the  same set of source  control files (a  variable
       length field is used for the source statement).

A set of  data base control files is  used to manage the source.   Each
set of  control files can manage  multiple source files.   You can have
multiple versions of  the same  control files  in different  libraries.
The control files do not  have to be in the same library  as the source
files being controlled.

The following files are created by the CRTSRCCTL command.

   SRCMSTP       The master  file with one  record per member  which is
                 being   controlled.    The   information  is  supplied
                 automatically  from the  member  description  and  the
                 source  control function.   There are  optional fields
                 that  you   may  use  to  help  further  describe  the
                 member.  This is discussed later.

   SRCAUDP       The audit  file with  one record  per  event that  has
                 occurred.

   SRCDTLP       The detail source  changes (archive).  If  CHKSRCIN is
                 used  frequently,  this file  can become  large.   You
                 decide  how  often  to  cleanup  the  file  to  remove
                 unwanted information.

                     SOURCE CONTROL FILES

           Master           Audit            Detail

         ***********      ***********      ***********
         *         *      *         *      *         *
         * SRCMSTP *      * SRCAUDP *      * SRCDTLP *
         *         *      *         *      *         *
         ***********      ***********      ***********

         One record       One record       Archive with
         per member          per             copies of
           being          Source Control   old and new
         controlled          event            source


   Production             ***********      ***********
     Source               *         *      *         *
                          * QCLSRC  *      * QRPGSRC *   ......
                          *         *      *         *
                          ***********      ***********
                              x                x
Controlled objects            x                x
------------------------------x----------------x---------------------
Programmer library            x                x
                              x                x
                          ***********      ***********
   Test Source            *         *      *         *
                          * QCLSRC  *      * QRPGSRC *   ......
                          *         *      *         *
                          ***********      ***********


                          COMMANDS

   CHKSRCOUT       CHKSRCIN         MTNSRCCTL     RTVSRCCTL   DSPSRCCTL
   ---------       --------         ---------     ---------   ---------

   Copies from     Copies from      Initialize    Copies      Displays
   controlled      Pgmr library     /refresh/     from        entries
   source to       to controlled    cleanup of    archive     in audit
   Pgmr library    source           control       to a        file
                                    files         library

The following commands are provided:

   CRTSRCCTL     Create  source control  - Creates  the  files used  by
                 the tool.

   CHKSRCOUT     Check  source out  -  Used  by a  programmer  to begin
                 work  on a source member.   This copies the production
                 member to  a named  source file and  places a  logical
                 lock on the member to prevent another 'check out'.

   CHKSRCIN      Check  source in  - Used  by a  programmer to  place a
                 source  member  into a  production file.    The member
                 can be a new member or a replacement.

   MTNSRCCTL     Maintain source  control -  Used by  an  administrator
                 to initialize  or refresh the  SRCMSTP file.   It also
                 provides  options to  clean out  old entries  from the
                 SRCAUDP and SRCDTLP files.

                 MTNSRCCTL must be used to  specify that a source  file
                 is  to be  managed  by Source  Control.   The  SRCMSTP
                 file  will  contain  member  records for  each  source
                 file   that  is  being  controlled.    The  individual
                 members are  not described on  the MTNSRCCTL  command.
                 When  a  source  file  is placed  under  control,  the
                 existing  source  file  member  descriptions are  read
                 and placed into the SRCMSTP file.

   RTVSRCCTL     Retrieve source  control  - Used  by a  programmer  or
                 administrator  to  retrieve a  previous  version  from
                 the  SRCDTLP  file  (archive).    The  version can  be
                 placed back  into the  production  source file  or  in
                 any  source  file.    The  member  is  not  considered
                 'checked out'.

   DSPSRCCTL     Display  source  control -  Used  by  a programmer  or
                 administrator  to  review the  audit trail  of changes
                 to a  source member.    A simple  method of  accessing
                 the RTVSRCCTL command is also supported.

   DSPCHKOUT     Display  check   out  -   Used  by  a   programmer  or
                 administrator  to review the members  that are checked
                 out.

   CVTSRCCTL     Convert source  control -  One time  only function  if
                 the SRCCTL  files were created  prior to an  update of
                 the TAA  Productivity Tools shipped in  July 1996.  If
                 another SRCCTL  command attempts  to run  against  the
                 old format  of the files,  a message  is sent and  the
                 owner  or  an  *ALLOBJ  user  must  run  CVTSRCCTL  to
                 rebuild the files in the new format.

                 You  may also use  CVTSRCCTL to verify  that the files
                 are in the  correct format.   No conversion occurs  if
                 the  correct format is  found, but  the status  may be
                 verified.

Getting started
---------------

The following steps are needed:

  **   Determine what source files need to be controlled.

  **   Determine  how many  sets  of Source  Control files  will exist.
       You can  have one  or  more sets,  but  each set  must be  in  a
       unique  library.   Determine  the  libraries that  will  contain
       these files.

  **   Create  the  Source Control  files with  the  command CRTSRCCTL.
       Name the library where you want the control files to exist.

  **   Review the  security considerations  section for  this tool  and
       determine what  your  security strategy  will be.   The  minimum
       you should consider is:

              Make   the  source  files   that  you  want   to  control
              authorized   to  the   public  for  'read   only'.    Use
              EDTOBJAUT and specify *USE for the user *PUBLIC.

  **   Use MTNSRCCTL and name the files that are to be controlled.

If  you have  versions  of  source  that  you already  consider  to  be
'checked  out' before  you  use  MTNSRCCTL, you  can  'check out'  each
member to  any source file by using CHKSRCOUT.   There is no check made
when CHKSRCIN is used  that the member is  being 'checked in' from  the
same source file that it was 'checked out' to.

Command parameter approach
--------------------------

The  Source  Control  function  assumes  that  you  have  one  or  more
production source  files that are being controlled  in a single SRCMSTP
file.  A  second source file  must exist where  the actual  maintenance
will  be performed  (normally  in a  different  library).   The  Source
Control  function essentially  controls the  movement  into and  out of
the source file which is being controlled.

Each  member  that  is  being controlled  is  represented  by  a single
record in the  SRCMSTP file.   This record  contains the file,  library
and member  name.  Most of  the commands request that  you identify the
CTLFILE  and  CTLMBR.   This  refers to  the  record in  SRCMSTP.   The
record is first  accessed to  determine if the  function requested  can
be performed.   The  corresponding actual  source member  is implicitly
identified.   The member records may then be copied  into or out of the
source file that is being controlled.

All of the commands support  the SRCCTLLIB parameter which defaults  to
*LIBL.   This  determines which  library  to search  for  the 3  Source
Control  files.  You  can have multiple  Source Control files  (such as
one per major application).

Security
--------

In  a typical situation,  the source files  would be owned  by the same
user who is administering the Source Control function.

Before you  begin operations, you  must create  the control files  that
will  be  used (CRTSRCCTL  command)  and you  may  need  to change  the
authorization  of the  source files  that you intend  to control.   You
may make  it  totally private,  but the  normal  approach would  be  to
provide *USE to  *PUBLIC.  This will  allow anyone to read  or copy the
members,  but  will  prevent any  changes  unless  made through  Source
Control.

The CHKSRCIN and CHKSRCOUT commands  adopt ownership to allow users  to
operate on  the files  only through  the controlled  environment.   The
other  SRCCTL commands do  not adopt.   Therefore, if the  source files
are  read  only,  a  user  cannot update  them  using  a  function like
RTVSRCCTL.

You may  authorize  one or  more programmers  who  will administer  the
Source Control  function to have all  rights to the  source files being
controlled.

The  Source Control  function  defaults to  allow any  user to  use the
'check in/out' functions.   If you  want to control  who is allowed  to
perform these  functions, there is  a data  area named SRCCTL  which is
implicitly  created in each library  that has a SRCMSTP  file.  This is
created with  public authority  which  allows any  user to  use  'check
out/in'.   You  can revoke  the  public authority  to  this object  and
authorize individual users to the data area with *USE authority.

When  a Source Control  command is  requested, it checks  the authority
to  the data  area using  the CHKOBJ command  for *USE  authority.  The
commands  that  adopt authority,  execute  CHKOBJ  thru  the  TAA  Tool
UNADOPT.   If the user is  not authorized, any of  the command requests
are rejected.

Length restrictions
-------------------

The  Source Control tool  will prevent you from  truncating source data
as source is copied.   For example,  if a source  file has a length  of
112,  you cannot  check out  source or  retrieve it  to a  file with  a
length of 92.

CRTSRCCTL command                                     *CMD
-----------------

The  CRTSRCCTL command  creates the  control files  used by  the Source
Control tool.

   LIB           The library to create the files in.

   SRCLIB        The source library to use  for the QATTDDS file.   The
                 default  is *TAAARC  which  means  to use  the  source
                 from the TAA Archive.

CHKSRCOUT command                                     *CMD
-----------------

The  CHKSRCOUT  command  'checks  out'  a  member from  the  production
source environment to allow a programmer to perform maintenance.

A   typical  command  to  'check  out'  the  PAYROLL  member  from  the
PRODUCTION/QCLSRC file  and copy the  records to  the same member  name
in TESTLIB/QCLSRC would be:

              CHKSRCOUT    CTLFILE(PRODUCTION/QCLSRC)
                           CTLMBR(PAYROLL)
                           TOFILE(TESTLIB/*FROMFILE)

The following parameters are supported:

   CTLFILE       The   qualified  source   file  being   controlled  in
                 SRCMSTP.

   CTLMBR        The source member being controlled in SRCMSTP.

   TOFILE        The  qualified TO  source file  where the  member will
                 be copied to.  The  default is *FROMFILE.  Normally  a
                 library is specified.

   TOMBR         The  TO member  where the  source will  be copied  to.
                 This  will replace any  existing source  in the member
                 if it exists.   The  member is  added if  it does  not
                 exist.  The default is *FROMMBR.

   SRCCTLLIB     The library which  contains the Source  Control files.
                 *LIBL is the default.

CHKSRCIN command                                      *CMD
----------------

The  CHKSRCIN command  'checks in'  a member  to the  production source
environment.

A   typical  command  to  'check  in'   the  PAYROLL  member  from  the
TESTLIB/QCLSRC file  and copy the  records to the  same member name  in
PRODUCTION/QCLSRC would be:

              CHKSRCIN     FROMFILE(TESTLIB/QCLSRC)
                           FROMMBR(PAYROLL)
                           TOFILE(PRODUCTION/*FROMFILE)

The following parameters are supported:

   FROMFILE      The qualified  FROM source  file which has  the source
                 to be entered into the Source Control system.

   FROMMBR       The  FROM source  member  which has  the source  to be
                 entered into  the  Source  Control  system.    If  the
                 member is  replaced or added,  the source  member text
                 and  source type of  the From  member is used  for the
                 CTLMBR.

   CTLFILE       The qualified  source file  in SRCMSTP  which will  be
                 updated  with the  new information.    The default  is
                 *FROMFILE.

   CTLMBR        The  source member  in SRCMSTP  which will  be updated
                 with  the new  information.  The  default is *FROMMBR.

   OPTION        The option  required.  The  default is  *REPLACE.   If
                 the  source is  already checked  out, it  can  only be
                 replaced or unlocked by the same user.

           *ADD       A  new  member  record  is  to  be  added to  the
                      SRCMSTP file.   The  FROM source  member  records
                      will be added to the file.

           *REPLACE   An  existing member  record in  the SRCMSTP  file
                      is  to  be  updated.    The  FROM  source  member
                      records will replace the existing member.

           *DELETE    Delete an existing member  record in the  SRCMSTP
                      file.    The  existing  member  records  will  be
                      deleted.

           *UNLOCK    A member  record which is  locked ('checked out')
                      to  a  user  should be  unlocked.    The existing
                      member records remain  unchanged.  This  allows a
                      user to  unlock a  member that is  locked without
                      updating  it.  Only  the user  that 'checked out'
                      the member may unlock it.   This is intended  for
                      the  case where  the  user  has 'checked  out'  a
                      member and then decides not to update it.

           CHGTXT     A  256  byte character  field to  provide  a text
                      description  of  why  the  CHKSRCIN  command   is
                      being used.

           SRCCTLLIB  The  library which  contains  the Source  Control
                      files.  *LIBL is the default.

           RMVM       Should  the member be  removed from  the FROMFILE
                      at  the end of  execution.  The  default is *YES.
                      This  is  a  cleanup  function  that  allows  the
                      programmer  operating in  the test  file to  keep
                      the  number of  members minimal.   The  intent of
                      the default is that  by removing the member,  the
                      programmer  will  know  that  everything  in  his
                      version  of  the  file  is  either  new or  is  a
                      member which is still 'checked out'.

MTNSRCCTL command                                     *CMD
-----------------

The MTNSRCCTL command initializes or  refreshes the information in  the
SRCMSTP  file (one  record  per  member  being controlled).    It  also
allows  cleanup  of the  other  files  to delete  records  that are  no
longer needed.

This is a long running command and should be submitted to batch.

To  cause a source file to be  managed by Source Control, the MTNSRCCTL
command does  not specify  individual members.   Only  the source  file
name is specified.   This will cause all of  the existing source member
descriptions  to  be read  and  a record  created in  SRCMSTP  for each
source member.

A typical  command to  initialize  the SRCMSTP  file with  the  records
from PRODUCTION/QCLSRC would be:

              MTNSRCCTL    FILE(*SRCMSTP)
                           FROMFILE(PRODUCTION/QCLSRC)

A typical  command to cleanup  the SRCDTLP file  (the archive)  so that
all source records older than 050101 would be deleted would be:

              MTNSRCCTL    FILE(*SRCDTLP)
                           DTLDATE(050101)

A  typical command to cleanup  the SRCAUDP file (one  record per event)
so that all  audit records  older than  050101 would  be deleted  would
be:

              MTNSRCCTL    FILE(*SRCAUDP)
                           AUDDATE(050101)

The following parameters are supported:

   FILE          The file  to be maintained.   Only the  special values
                 may be entered (not the file name):

           *SRCMSTP   *SRCMSTP  The  source  master file  SRCMSTP  with
                      one record per member.

           *SRCCTLP   The  source  detail  file  SRCDTLP  (the archive)
                      with  a set  of  records  each  time  a  CHKSRCIN
                      function is  performed.  One  source statement is
                      written  as  one data  base  record  with heading
                      information attached.   Therefore, this file  can
                      become large.

           *SRCAUDP   The  source audit  file SRCAUDP  with one  record
                      per  event  that  has  occurred  with the  Source
                      Control function.

   FROMFILE      The qualified  FROM source  file  which is  used  only
                 for   FILE(*SRCMSTP).      This   parameter   operates
                 differently  based   on  the  value   of  the  DLTSRCF
                 parameter.

   DLTSRCF       A *YES/*NO value which defaults to *NO.

                 DLTSRCF(*NO)   ensures  that  the  SRCMSTP  file  will
                 correspond  to   the  FROMFILE   source  file.     The
                 FROMFILE  source file  will  be read  and each  member
                 will  result in  one record in  the SRCMSTP  file.  If
                 no record exists,  it is added.   If a record  exists,
                 it  is updated  (eg.   the  member text  description).
                 If  no  member exists  for  a SRCMSTP  record  for the
                 file named, the  record is deleted  (the SRCMSTP  file
                 should reflect one record per existing member).

                 DLTSRCF(*YES) should  be  specified to  delete all  of
                 the  file name  entries  in SRCMSTP  for  the FROMFILE
                 parameter.    This  allows  a  method  of  deleting  a
                 source file from  the SRCMSTP  record when the  entire
                 file  is  no  longer  being  controlled.    No  action
                 occurs to the FROMFILE records.

   DTLDATE       The  date  to  be compared  against  in  SRCDTLP which
                 determines whether records  will be  dropped from  the
                 SRCDTLP file.   The  date compared  is the  audit date
                 (the  date  the  event  occurred  and  not  individual
                 source statements  or the  member change  date).   The
                 entry is  made  in the  form YYMMDD  and  can only  be
                 entered  when FILE(*SRCDTLP)  has been  specified.   A
                 record  is dropped if it is  less than or equal to the
                 parameter date.

                 This    parameter    is    intended    for    periodic
                 housecleaning  of the  SRCDTLP file.   If  you perform
                 CHKSRCIN  frequently,  the  SRCDTLP  file will  become
                 large and  periodically needs  to  be cleaned  out  to
                 some retention date.

   AUDDATE       The  date to  be  compared  against in  SRCAUDP  which
                 determines  whether  audit  records  will  be  dropped
                 from the  SRCAUDP  file.   The  date compared  is  the
                 audit date (the  date the event occurred).   The entry
                 is  made in the  form YYMMDD  and can only  be entered
                 when  FILE(*SRCAUDP) has been specified.   A record is
                 dropped if it is  less than or equal to  the parameter
                 date.

                 This    parameter    is    intended    for    periodic
                 housecleaning of the SRCAUDP file.

                 It  is not required  that the  SRCAUDP file correspond
                 exactly with  the  SRCDTLP  file.   For  example,  you
                 might  want to  keep  several  years history  of  when
                 changes  occurred and the  reason.  You  might want to
                 keep only the  last 6  months worth  of actual  source
                 before and after images  in the SRCDTLP file.   If you
                 wish   to  use   the  retrieve   function   for  prior
                 versions, the records must exist in SRCDTLP.

   SRCCTLLIB     The  library which contains  the Source Control files.
                 *LIBL is the default.

RTVSRCCTL command                                     *CMD
-----------------

The RTVSRCCTL  command retrieves a  version from  the SRCDTLP file  and
writes  it to a  designated member.   The  production source  member is
not read.  Instead the version in SRCDTLP (the archive is used).

You  have an  option to  copy the  source to the  source file  which is
being controlled  (overlay  the production  source)  or  copy it  to  a
different source file.

  **   If you  copy to  the production source,  this causes  a previous
       version  to  become the  current version.    It acts  as  if you
       'checked in' the source and the archive is updated.

  **   If you copy  the version  to any  other source file,  it is  not
       considered to  be 'checked out'.   This  function allows you  to
       retrieve  old  versions for  whatever  purpose without  changing
       the production source.

A  typical  command to  retrieve the  last old  version in  the SRCDTLP
file for the PAYROLL member  from PRODUCTION/QCLSRC and copy it  to the
member PAYROLL in TESTLIB/QCLSRC would be:

              RTVSRCCTL    CTLFILE(PRODUCTION/QCLSRC)
                           CTLMBR(PAYROLL)
                           TOFILE(TESTLIB/QCLSRC)

Note that this  does not change the production  source.  The programmer
has only requested to copy the last version into his test library.

To  reset the production source to the  previous version that exists in
the archive you would specify:

              RTVSRCCTL    CTLFILE(PRODUCTION/QCLSRC)
                           CTLMBR(PAYROLL)
                           TOFILE(*CTLFILE)

The following parameters are supported:

   CTLFILE       The  qualified   source  file   being  controlled   in
                 SRCMSTP.

   CTLMBR        The source member being controlled in SRCMSTP.

   TOFILE        The qualified  TO source  file where  the member  will
                 be  copied to.   The  default  is *CTLFILE  meaning to
                 use the file  named in  the CTLFILE  parameter.   This
                 replaces the  production  source.   If the  production
                 source has  been deleted, a new member  will be added.

   TOMBR         The  TO  member where  the source  will be  copied to.
                 The default is  *CTLMBR meaning to  use the same  name
                 as the CTLMBR parameter.

   SRCDATE       The  source  date  in  YYMMDD form  in  SRCDTLP  which
                 should  be retrieved.   The  default is  *LAST meaning
                 the last set  of source written.   When a  replacement
                 occurs both  the old and  new versions are  written to
                 the  archive.   The  last  source written  is  the new
                 version.

   SRCTIME       The source time  for records in  SRCDTLP which  should
                 be retrieved.   The default is *LAST meaning  the last
                 set of source written.

   VERSION       The version  *NEW or *OLD  in SRCDTLP which  should be
                 retrieved.   This  must correspond  to how  the source
                 was written  to the  SRCDTLP  file.   For example,  if
                 OPTION(*ADD)  was specified on  CHKSRCIN, only  a *NEW
                 version  can  be  requested for  that  date  and time.
                 See the  section  on action  codes.   The  default  is
                 *OLD which is  the normal request for a  replace or to
                 recover production source which was deleted.

   SRCCTLLIB     The  library which contains the  Source Control files.
                 *LIBL is the default.

DSPSRCCTL command                                     *CMD
-----------------

The DSPSRCCTL  command  displays  the audit  records  (one  record  per
source control event) for  a source file or member.   This provides the
information of  who made the change,  when the change was  made and the
text  describing the change.  An  option to easily access the RTVSRCCTL
function exists from the display.

The records appear in a subfile  and can be rolled.  You can  limit the
number of records which appear.

  **   If CTLFILE  is not  specified, all records  in the  SRCAUDP file
       will appear.

  **   If  CTLFILE is  specified but  not CTLMBR,  all records  for the
       named file will appear.

  **   If CTLFILE and  CTLMBR are specified,  only those records  which
       match both will appear.

A typical command to  display all of the audit  entries for the PAYROLL
member from PRODUCTION/QCLSRC would be:

              DSPSRCCTL    CTLFILE(PRODUCTION/QCLSRC)
                           CTLMBR(PAYROLL)

The following parameters are supported:

   CTLFILE       The   qualified  source   file  being   controlled  in
                 SRCMSTP.

   CTLMBR        The source member being controlled in SRCMSTP.

   SRCCTLLIB     The library which contains  the Source Control  files.
                 *LIBL is the default.

DSPCHKOUT command                                     *CMD
-----------------

   USER          The  user  to  list 'checked  out'  members  for.    A
                 specific user or *ALL may be entered.

   CTLFILE       The   qualified  source   file  being   controlled  in
                 SRCMSTP.   Both  the file  and the  library default to
                 *ALL.   A  specific file  or library  or  both may  be
                 named.

   SRCTYPE       The  type  of source  to  list  'checked out'  members
                 for.   The default is  *ALL.  A  specific type such as
                 CLP or RPG may be entered.

   SRCCTLLIB     The library which contains  the Source Control  files.
                 *LIBL is the default.

   SEQ           The type of  sequence used for the listing.   *FILE is
                 the   default  meaning  the  records   are  listed  in
                 library/file/member order.

                 *USER  may  be   entered  to  list   the  records   by
                 library/file/member within user name.

   OUTPUT        How  to output  the  results.   *  is the  default  to
                 display  the spooled  file if  the command  is entered
                 interactively.   The spooled file  is deleted after it
                 is displayed.

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


CVTSRCCTL command                                     *CMD
-----------------

The  CVTSRCCTL command is a one time  only function that is required if
the files  were created  prior to  an update  of  the TAA  Productivity
Tools shipped  in July  1996.   If another  SRCCTL command attempts  to
run  against the old  format of  the files, a  message is sent  and the
owner or an  *ALLOBJ user must  run CVTSRCCTL to  rebuild the files  in
the new format.

   SRCCTLLIB     The library which  contains the Source  Control files.

   WRKLIB        The  library which  will contain  the work  files that
                 are  temporarily created  and used  by CVTSRCCTL.   If
                 CVTSRCCTL  completes   successfully,  the  files   are
                 deleted.

   FILE          The file to  be converted.  The default  is *ALL which
                 should be used unless errors occur.

                 If  errors  occur, a  specific  file may  be  named to
                 convert.  It must be SRCMSTP, SRCDTLP, or SRCAUDP.

Action codes in the audit file
------------------------------

When the audit file is  displayed, the action code which describes  the
type of  entry that  occurred can be  found in the  SAACTN field.   The
entries are:

     OUT      CHKSRCOUT was used
     ADD      CHKSRCIN was used with OPTION(*ADD)
     DLT      CHKSRCIN was used with OPTION(*DLT)
     RPL      CHKSRCIN was used with OPTION(*REPLACE)
     UNL      CHKSRCIN was used with OPTION(*UNLOCK)
     RTV      RTVSRCCTL was used
     MST      MTNSRCCTL was used with DLTSRCF(*NO)
     DRP      MTNSRCCTL was used with DLTSRCF(*YES)
     AUD      MTNSRCCTL was used with AUDDATE
     DTL      MTNSRCCTL was used with DTLDATE

Source Detail File SRCDTLP (the archive)
---------------------------------------

Whenever source  is changed in a file  being controlled (or accessed by
the RTVSRCCTL  command) a  copy of  the source  is placed  in  SRCDTLP.
Each  record  contains  the  source   statement,  the  source  sequence
number, the source change date, and a key field to allow access.

The source  statement is defined as a variable  length field within the
file.   The  field has an  allocated length of  82 bytes to  hold an 80
byte statement  and  the 2  byte  count of  the  length of  the  field.
Normal 92  byte source files (80  bytes of source data)  fit within the
allocated   space.    If   an  RPGLE  source   statement  is  processed
containing more  than  80  bytes  of  data,  the  system  automatically
handles the excess beyond 80.

The key field is made up of:

     Library
     File
     Member
     Date
     Time
     Type code (N = new O = old)

The date/time  fields correspond to the  audit date/time.  This  is the
date/time the  audit entry was written and  does not represent the last
change date/time of the source.

The following commands and options cause entries to SRCDTLP:

       CHKSRCIN    *ADD        New
                   *DLT        Old
                   *REPLACE    Old and New

       RTVSRCCTL               Old

Optional fields in SRCMSTP
--------------------------

The Source Control  function provides  additional fields  that you  can
use in the SRCMSTP file  (one record per member).  If you  do not, they
will just appear as blank values.

  **   The  SMOWN and SMAPP  fields are designed  to allow an  owner to
       be  identified for each source  member and an application group.
       To place values  in these fields, you  will need a program  like
       DFU  to   update  the  records  after  they   are  created  with
       MTNSRCCTL.

       This  allows you to  print reports based on  application area or
       owner.

  **   The SMCRT, SMRELD  and SMRELT fields exist  in the SRCMSTP  file
       to allow  you to determine whether  you have processed  a member
       that has  been 'checked in'.   The SMCRT field is  set to X when
       a member is added or replaced.

       The intent is that you would  have a user written program  which
       would scan SRCMSTP for  an 'X' in SMCRT (OPNQRYF  could be used)
       and  then perform  your  own requirements  relative  to creating
       the  object in a  production library.   Your program should then
       set the SMCRT  field to blank and  update the SMRELD and  SMRELT
       fields with the current date and time.

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

The following TAA Tools must be on your system:

      CPYTAADDS    Copy TAA DDS
      CVTDBFFMT    Convert data base format
      EDTVAR       Edit variable
      PMTOPR       Prompt operator
      SNDCOMPMSG   Send completion message
      SNDESCMSG    Send escape message
      SNDSTSMSG    Send status message
      UNADOPT      Unadopt

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

The tool is  ready to use, but you must create  the required files with
the command:

      CRTSRCCTL     LIB(xxx)

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

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

   SRCCTL        *DTAARA                      No source
   TAASRCHD      *DSPF         DSPF        TAASRCHD       QATTDDS
   TAASRCHP      *PF           PF          TAASRCHP       QATTDDS
   TAASRCHQ      *PF           PF          TAASRCHQ       QATTDDS
   TAASRCHS      *PF           PF          TAASRCHS       QATTDDS
   CHKSRCOUT     *CMD                      TAASRCH        QATTCMD
   CHKSRCIN      *CMD                      TAASRCH2       QATTCMD
   MTNSRCCTL     *CMD                      TAASRCH3       QATTCMD
   RTVSRCCTL     *CMD                      TAASRCH4       QATTCMD
   DSPSRCCTL     *CMD                      TAASRCH5       QATTCMD
   CRTSRCCTL     *CMD                      TAASRCH8       QATTCMD
   CVTSRCCTL     *CMD                      TAASRCH9       QATTCMD
   DSPCHKOUT     *CMD                      TAASRCH10      QATTCMD
   TAASRCHC      *PGM          CLP         TAASRCHC       QATTCL
   TAASRCHC2     *PGM          CLP         TAASRCHC2      QATTCL
   TAASRCHC3     *PGM          CLP         TAASRCHC3      QATTCL
   TAASRCHC4     *PGM          CLP         TAASRCHC4      QATTCL
   TAASRCHC5     *PGM          CLP         TAASRCHC5      QATTCL
   TAASRCHC6     *PGM          CLP         TAASRCHC6      QATTCL
   TAASRCHC7     *PGM          CLP         TAASRCHC7      QATTCL
   TAASRCHC8     *PGM          CLP         TAASRCHC8      QATTCL
   TAASRCHC9     *PGM          CLP         TAASRCHC9      QATTCL
   TAASRCHC10    *PGM          CLP         TAASRCHC10     QATTCL
   TAASRCHR      *PGM          RPG         TAASRCHR       QATTRPG
   TAASRCHR2     *PGM          RPG         TAASRCHR2      QATTRPG
   TAASRCHR3     *PGM          RPG         TAASRCHR3      QATTRPG
   TAASRCHR4     *PGM          RPG         TAASRCHR4      QATTRPG
   TAASRCHR5     *PGM          RPG         TAASRCHR5      QATTRPG
   TAASRCHR10    *PGM          RPG         TAASRCHR10     QATTRPG
   TAASRCHR19    *PGM          RPG         TAASRCHR19     QATTRPG

The files in the library for CRTSRCCTL are created as:

                 File        Source member
                 ----        -------------

                 SRCMSTP     TAASRCHP
                 SRCAUDP     TAASRCHQ
                 SRCDTLP     TAASRCHS

Structure
---------

  CRTSRCCTL   Cmd
    TAASRCHC8     CL

  CHKSRCOUT   Cmd
    TAASRCHC      CL
       TAASRCHR      RPG

  CHKSRCIN    Cmd
    TAASRCHC2     CL
       TAASRCHR2     RPG

  MTNSRCCTL   Cmd
    TAASRCHC3     CL
       TAASRCHR3     RPG
         TAASRCHC3      CL

  RTVSRCCTL   Cmd
    TAASRCHC4     CL
       TAASRCHR4     RPG
         TAASRCHC7      CL

  DSPSRCCTL   Cmd
    TAASRCHC5     CL
       TAASRCHR5     RPG
          TAASRCHC6    CL
          TAASRCHD     Display

  CVTSRCCTL   Cmd
    TAASRCHC9     CL
       TAASRCHR19    RPG

  DSPCHKOUT   Cmd
    TAASRCHC10    CL
       TAASRCHR10    RPG
					

Added to TAA Productivity tools April 1, 1995


Home Page Up to Top