TAA Tools
CMPIFS          COMPARE IFS                            TAAIFTT

The Compare IFS command  is designed to assist when you  want to ensure
that  IFS objects in  one or more  directories on different  systems or
partitions  are the  same.   The CAPIFS  command must  be used  on both
systems/partitions to capture the  IFS information.  The two  libraries
containing the  CAPIFS information must  exist on the same  system when
CMPIFS  run.     A  spooled  file  is  displayed  or  output  with  the
differences.

You must have *ALLOBJ special authority to use CAPIFS.

CMPIFS will check for missing objects in both sets of information.

Objects are flagged  if they  exist in  one of the  libraries, but  not
the other.

The following  is compared if  the same  IFS object exists  and flagged
if differs for:

     - Object type (eg *STMF)
     - Owner

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

  **   Assume  you  want  to compare  the  IFS  objects from  directory
       'home/abc' on  a  backup  system  to the  same  directory  on  a
       production system.

  **   Use  a  special  library for  CAPIFS  such  as  IFSINFO1.    The
       library  could include other  objects that  you want  to compare
       by your own code or other TAA Tools.

  **   As  a  user  with  *ALLOBJ  special  authority,  use  the CAPIFS
       command on the backup system such as:

              CAPIFS    OUTLIB(IFSINFO1) OBJ('/home/abc')

By default,  any objects owned  by IBM  profiles such  as QSYS or  QSPL
are bypassed.

The default for  OBJ is *IFS which will  convert all directories except
for  /QDLS, /QOPT, and  /QSYS.LIB.  This  would normally  be entered if
you want to capture all IFS objects.

       The IFSINFO1 library will contain:

            - IFSOBJ  - A file copied from CVTIFS outfile

       Because the field  containing the path name  is 5000 bytes,  the
       IFSOBJ file can be large if many objects are captured.

  **   The  library  should  then  be  transmitted  to  the  production
       system.  The TAA Tools SAVSNDL and RSTSNDL could be used.

  **   CAPIFS would  then be run on the  production system for the same
       directory:

              CAPIFS    OUTLIB(IFSINFO2) OBJ('/home/abc')

       The IFSINFO2 library must exist.

  **   Run CMPIFS for the comparison:

              CMPIFS    FROMLIB(IFSINFO1) TOLIB(IFSINFO2)

       A spooled file would be displayed with any differences.

How CMPIFS operates
-------------------

CAPIFS ensures the OUTLIB  exists.  CVTIFS is  used to convert the  IFS
objects to an  outfile in QTEMP.   Each record is then read  and copied
to  the  IFSOBJ file  in  the specified  library  if the  owner  is not
omitted.

CMPIFS  begins by checking  the files in  the From and  To libraries to
ensure they exist and have the proper format names.

Keyed files  of TAAIFSAT  (CVTIFS outfile)  are created  in QTEMP  with
the key on  IFOBJP (the 5000 byte field which contains  the name of the
IFS  object).  The IFSOBJ file  in each library is  copied to the keyed
version of the same format.

CMPIFS begins by  reading the IFS  object records in  the From  library
and  attempts   to  randomly  access  the   same  record  key   in  the
corresponding  file  in the  To  library.   If  the same  key  does not
exist, the record is flagged and listed.

If the same  record exists, a  comparison is made of  the object  type,
and  owner.   If  any  differences exist,  the  record is  flagged  and
listed.

When all  IFS object records  in the From  library have been  read, the
IFS  object  records in  the  To library  are  read beginning  with the
first record.  An  attempt is made to  randomly access the same  key in
the in  the From  library file.   If the same  key does not  exist, the
record is flagged and listed.

CAPIFS escape messages you can monitor for
------------------------------------------

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

CMPIFS escape messages you can monitor for
------------------------------------------

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


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

   OUTLIB        The  library where  the  information will  be captured
                 to.  The library must exist.

                 The library will contain the  IFSOBJ file which is  in
                 the same format as the CVTIFS outfile.

   OBJ           The  path name  of  the IFS  objects  to be  captured.
                 Normally a  directory name would be  entered or one of
                 the special values.

                 The default  is  *IFS  which will  start  the  convert
                 process at  the root  directory level ('/')  excluding
                 /QDLS, /QOPT and /QSYS.LIB.

                 Specifying  * will  start the  convert process  at the
                 current  directory  level.   If the  current directory
                 level is at the  root ('/'), the convert process  will
                 start at the home directory ('/home').

   REPLACE       A *YES/*NO  parameter for whether to  replace the data
                 in the IFSOBJ file (a single member exists).

                 *YES  is  the  default  in  which  case  if  the  file
                 already exists it is deleted and recreated.

                 *NO may be specified to add records to the file.

   OMTOWN        A list of up to 100  owner names to be omitted.   This
                 allows you to  avoid objects owned by  system profiles
                 and/or specific profiles.

                 *IBM  is the default  which will  omit system profiles
                 such as QSYS,  QLPINSTALL, QTCP, QSPL,  etc.  For  the
                 complete  list, see  the source  for  TAAIFTTC2.   The
                 value  *IBM  may  be  entered  in  addition  to  other
                 values.   No entry can appear  twice in the same list.

   PROCSUBDIR    If the  Object  parameter is  a  directory, specify  a
                 *YES/*NO    value    to     indicate    whether    all
                 subdirectories  relative to  that directory are  to be
                 included.  The default is *YES.

                 *NO may  be specified  to process  only the  directory
                 level.

   OMITDIR       If the  Object parameter  is a  directory, specify  up
                 to  10 subdirectory  names relative to  that directory
                 to be excluded.

                 Any of the  OMITDIR entries may  be a subdirectory  of
                 the  directory specified  for the  OBJ  parameter.   A
                 subdirectory can  go multiple levels  deep, but cannot
                 skip  any directories along the  way.  For example, if
                 'Sub1' is a  directory in the  home directory and  has
                 a   subdirectory  of   'Sub1A',  you   cannot  specify
                 OBJ('*') and OMITDIR('Sub1A').

                 Generic  directories are  supported by  using an  * as
                 the last character  of an OMITDIR  path.  This  causes
                 any  directory  starting with  the  characters  before
                 the * to be omitted.

                 An omitted  directory cannot begin with a  / or \.  If
                 a directory specified  to be omitted  does not  exist,
                 no error occurs.

   SELECT        A list of  up to ten  values that lets you  include or
                 omit  files and  objects.   The  typical use  would be
                 for  stream  files (*STMF).   This  provides selection
                 in addition to  the OBJ parameter.   Directory entries
                 are always included.

                 The first  part of the  entry defaults to  *INCLUDE to
                 include  all of the values specified  for the 2nd part
                 of the entry.   *OMIT may  be entered to  omit all  of
                 the values  specified for the  2nd part of  the entry.

                 The  second  part of  the  entry  identifies the  file
                 (can be generic)  and its extension  (can be  generic)
                 to be  included/omitted.   The default  is *ALL.   The
                 default can  also be considered to be  '*' or '*.*' Up
                 to 10 entries may be specified.

                 Embedded  asterisks  and ?    as any  single character
                 are  not  supported.    The  matching  logic  is  case
                 insensitive (folded to upper case).

                 Examples:

                    *.txt   All files with a 'txt' extension
                    a*      All files where the name starts with 'a'
                    a*,b*   All files starting with 'a' and having
                               an extension that starts with 'b'
                    a.txt   All files named 'a' with a 'txt' extension
                    a       All files named 'a' with any extension

   USRPRF        The user  profile that will be switched  to during run
                 time.    QSECOFR is  the  default.   For  file systems
                 (such as QNTC), CVTIFS will  fail if QSECOFR does  not
                 exist.

                 *CURRENT may be  used or a specific  user profile, but
                 the profile must have *ALLOBJ special authority.

   CVTDDIR       A  *YES/*NO parameter  for whether to  convert entries
                 that are in a distributed directory.

                 *NO is the default to prevent conversion.

                 *YES  may   be   specified  to   convert   distributed
                 directory   entries.     You   must  understand   your
                 environment  if *YES is  to be  used.  It  is possible
                 to  loop  when  *YES  is  specified  if  a distributed
                 directory  contains   another  distributed   directory
                 that maps  back to  a previously  processed directory.


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

   FROMLIB       The  library name of the From  library to be compared.
                 The library  must  have  been  output  by  the  CAPIFS
                 command.

   TOLIB         The library  name of  the To  library to be  compared.
                 The  library  must  have  been  output  by the  CAPIFS
                 command.

   DIFFONLY      A *YES/*NO  parameter for  whether  to list  only  the
                 differences or all objects and members.

                 *YES is the default to list only differences.

                 *NO  may  be   specified  to  list  all   objects  and
                 members.

   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.


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

You must have *ALLOBJ special authority to use CAPLIB2.

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

The following TAA Tools must be on your system:

     CHKALLOBJ       Check *ALLOBJ special authority
     CHKDUPLST       Check duplicate list
     CVTIFS          Convert IFS objects
     CVTTIM          Convert time
     DUPTAADBF       Duplicate TAA data base file
     EDTVAR          Edit variable
     EXTLST2         Extract list 2
     RSNLSTMSG       Resend last message
     RTVFMT          Retrieve format
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     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
   ------        ----    ---------      ----------    ----------

   CMPIFS        *CMD                   TAAIFTT       QATTCMD
   CAPIFS        *CMD                   TAAIFTT2      QATTCMD
   TAAIFTTC      *PGM       CLP         TAAIFTTC      QATTCL
   TAAIFTTC2     *PGM       CLP         TAAIFTTC2     QATTCL
   TAAIFTTR      *PGM       RPG         TAAIFTTR      QATTRPG
   TAAIFTTR2     *PGM       RPG         TAAIFTTR2     QATTRPG
   TAAIFTTP      *FILE      PF          TAAIFTTP      QATTDDS
   TAAIFTTQ      *FILE      PF          TAAIFTTQ      QATTDDS
   TAAIFTTS      *FILE      PF          TAAIFTTS      QATTDDS

The TAAIFTTS file is a duplicate  of TAAIFSAT and is used by CAPIFS  to
copy from the CVTIFS outfile for omitting members.

The TAAIFTTP  and TAAIFTTQ  files are  keyed versions  of TAAIFSAT  and
are used by CMPIFS to copy to in QTEMP from the TAAIFTTS file.


Structure
---------

CMPIFS      Cmd
   TAAIFTTC   CL pgm
     TAAIFTTR   RPG Pgm

CAPIFS      Cmd
   TAAIFTTC2   CL pgm
     TAAIFTTR2   RPG Pgm
					

Added to TAA Productivity tools January 15, 2009


Home Page Up to Top