TAA Tools
CMPSPLF         COMPARE SPOOLED FILES                  TAASPML

The  Compare  Spooled  Files  command  allows  the  comparison  of  two
spooled  files.   An  option exists  to  bypass certain  lines  such as
heading  lines where a date  or time may have  changed.  A spooled file
is output with the differences highlighted.

A typical command would be:

             CMPSPLF   FROMSPLF(ABC) TOSPLF(DEF) ENDBYPLIN(5)

Spooled file ABC would be  compared to spooled file DEF.   The defaults
are used  for the  FROMJOB and TOJOB  parameters so both  spooled files
must  exist in  the current job.   Any  lines between  line 1  and 5 of
each page would be bypassed.

A spooled  file named  CMPSPLF  would be  output with  any  differences
highlighted.   Each line of  print that differs  would be printed  as 4
lines:

      - Information line containing the Page and line numbers
      - From record
      - To record
      - Line of asterisks for the positions that differ.

CPYSPLF  is used  to convert  the  spooled file  to data  base members.
CPYSPLF does not support special  graphic characters so only normal  DP
output is  allowed.  No  comparison occurs  of spooled file  attributes
such as the 'number of copies' or 'user data'.

CMPSPLF  escape messages you can monitor for
--------------------------------------------

             TAA9891   The From spooled file cannot be converted
             TAA9892   The To spooled file cannot be converted
             TAA9896   Differences exist (based on ESCAPE parameter)

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

Windowing of print lines
------------------------

The  maximum print  line supported  is 378  positions  wide.   Only 127
positions  of printing  can be  shown when  differences occur.   If the
first position that differs  is beyond 127, the print line  is windowed
so that  the first difference can be  seen.  Each time  a difference is
detected,  the Information  line describes  where the  'start position'
of the line  is.   The last  position of difference  is also  described
for  each print  line,  but  the asterisks  may  not  print within  the
window.

Differences in pages and line number
------------------------------------

By  default, the  page number and  line number  are also compared.   If
differences exist, the Information  line contains an  entry on the  far
right.  See the CMPPAGLIN parameter to bypass the comparison.

End of file considerations
--------------------------

If the  number  of records  in the  files differs,  the excess  records
will  be printed as  differences.   The Information line  will describe
which  file is  at EOF  (End of file).   The  print data  will be blank
when a file is at EOF.   The Begin/End Bypass line function  is ignored
when one of the files reaches EOF.

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

   FROMSPLF      The name of the 'From' spooled file.

   FROMJOB       The  qualified  name  of  the  job  that  created  the
                 'From'  spooled file.   The  default is *  meaning the
                 current job.

   FROMSPLNBR    The number  of  the  spooled file  within  the  'From'
                 job.   The default is *ONLY.   *LAST may  be specified
                 for  the  last  spooled  file  of  the specified  name
                 within the job.   A specific  spooled file number  may
                 also be specified.

   TOSPLF        The name of the 'To' spooled file.

   TOJOB         The qualified  name of the  job that created  the 'To'
                 spooled file.   The default  is * meaning  the current
                 job.

   TOSPLNBR      The  number of the  spooled file within  the 'To' job.
                 The default  is *ONLY.    *LAST may  be specified  for
                 the  last spooled  file of  the specified  name within
                 the  job.  A specific spooled  file number may also be
                 specified.

   STRBYPLIN     The first  line on  each  page to  be bypassed.    The
                 default is  *NONE.  If a  number is entered,  a number
                 must  also be entered  in ENDBYPLIN.   The number must
                 be between 1 and 255.

   ENDBYPLIN     The last  line  on each  page  to be  bypassed.    The
                 default is  *NONE  meaning there  are no  lines to  be
                 bypassed.   The number must  be equal or  greater than
                 the STRBYPLIN value and must be between 1 and 255.

                 If  a  number  is  entered,  any  lines  on  each page
                 between the  STRBYPLIN and  ENDBYPLIN  values will  be
                 bypassed  (not  considered  for  differences).    This
                 allows  heading lines  which may contain  dates and/or
                 times to be bypassed.

   CMPPAGLIN     Whether to compare  the page  and line number  values.
                 *YES  is the  default  to cause  a  comparison.   Each
                 print  line in  each file has  an associated  page and
                 line number.    If *YES  is  specified, the  page  and
                 line  numbers  from  the   corresponding  records  are
                 compared  and the records  are printed  if differences
                 exist  regardless  of  whether  the  print  line  data
                 between the  two records  differs.   If the  page/line
                 values   differ,   the   Information   line   has   an
                 indication  on the  far right that  differences exist.

                 If *NO is  specified, the  page and  line numbers  are
                 not compared.

   MAXDIF        The  maximum  number  of  differences  allowed.    The
                 default  is 200.   Once  the  maximum is  reached, the
                 command ends and  the output spooled  file contains  a
                 description stating  the condition.   The number  must
                 be between 0 and 99999.

                 The  intent of  the  maximum is  to  prevent excessive
                 output   when   two   unrelated   spooled   files  are
                 compared.

   ESCAPE        Whether   to   send   escape   message    TAA9896   if
                 differences exist.   *NO is the default  which means a
                 completion    message    is   sent    describing   the
                 differences.

                 If  *YES  is  specified,  any  differences  cause  the
                 TAA9896 escape  message to  be sent.   Differences are
                 not considered in any lines being bypassed.

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

See previous comments.

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

The following TAA Tools must be on your system:

     CVTSPLNBR       Convert spooled file number
     EDTVAR          Edit variable
     HLRMVMSG        HLL Remove message
     RSNLSTMSG       Resend last message
     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
   ------        ----    ---------      ----------    ----------

   CMPSPLF       *CMD                   TAASPML       QATTCMD
   TAASPMLC      *PGM       CLP         TAASPMLC      QATTCL
   TAASPMLR      *PGM       RPG         TAASPMLR      QATTRPG
					

Added to TAA Productivity tools May 1, 1999


Home Page Up to Top