TAA Tools
CMPSTMF         COMPARE STREAM FILE                    TAAIFUN

The Compare  Stream File command  compares two  stream files and  lists
the  From and  To records  that  differ.   The named  stream  files are
copied  to 9999 byte files  in QTEMP and compared.   If differences are
found, the data from each record is listed up to 100 positions.

CMPSTMF cannot be used with binary stream files.

To compare just the description, use CMPIFSED.

A typical command would be:

             CMPSTMF    FROMSTMF(xxx) TOSTMF(yyy) MAXDIF(10)

The two stream files  would be copied to  9999 byte files in QTEMP  and
compared.   The comparison is  a simple compare  of each record  in the
From  file to the corresponding relative record  number in the To file.

If more  than 10  records differ,  only the  first 10  would be  listed
because of the MAXDIF(10) value.

If a  difference occurs  and the  first position  that differs is  less
than  80, the  first 100  positions of  each  record are  shown.   If a
difference occurs after position  80, the data is  shifted to the  left
beginning at 20 positions less than the first difference found.

If  the  command  is  run  in  batch  or  *PRINT  is  specified  and  a
difference occurs, an escape message is issued.

CMPSTMF escape messages you can monitor for
-------------------------------------------

      TAA9891    Differences exist
                   Only if in batch or *PRINT was specified

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

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

   FROMSTMF      The From stream file name.

   TOSTMF        The To stream file name.

   MAXDIF        The   number  of  differences   to  list.     If  more
                 differences  occur,  they  are not  listed  in detail.
                 This  is intended  to  prevent  a large  listing  when
                 many differences exist.

                 10 is the  default.  It must be a  value between 1 and
                 999.

   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
------------

The stream  files are copied  to data  base files that  are created  in
QTEMP with a length of 9999.

CMPSTMF cannot be used with binary stream files.

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

The following TAA Tools must be on your system:

     CHKIFSE         Check IFS entry
     CPYFRMSTM2      Copy from stream file 2
     EDTVAR          Edit variable
     RSNLSTMSG       Resend last message
     RTVIFSED        Retrieve IFS entry description
     RTVSYSVAL3      Retrieve system value 3
     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
   ------        ----    ---------      ----------    ----------

   CMPSTMF       *CMD                   TAAIFUN       QATTCMD
   TAAIFUNC      *PGM       CLP         TAAIFUNC      QATTCL
   TAAIFUNR      *PGM       RPG         TAAIFUNR      QATTRPG
					

Added to TAA Productivity tools July 15, 2013


Home Page Up to Top