TAA Tools
CMPDTAARA       COMPARE DATA AREA                      TAAARAI

The  Compare Data  Area  command  compares  the contents  of  two  data
areas.  The  type of data areas must be the  same (such as both *CHAR).
Decimal  data  areas  must match  in  length and  decimal  positions to
compare the values.  The  TAA9895 escape message is sent if  the values
do not  compare.  From and  To positions may be  compared for character
data areas.

A typical command would be:

             CMPDTAARA     FRMDTAARA(xxx) TODTAARA(yyy)

The TAA9895 escape message would be sent if the values differ.

When  comparing two unequal  length *CHAR type data  areas, the shorter
value is padded with blanks before making a comparison.

It is valid to compare using a DDM data area.

CMPDTAARA escape messages you can monitor for
---------------------------------------------

      TAA9895    The values differ.
      TAA9896    The attributes differ and cannot be compared.

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

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

   FRMDTAARA     The  qualified name  of  the  From  Data  Area.    The
                 library value  defaults to  *LIBL.   *CURLIB may  also
                 be used.

   TODTAARA      The  qualified  name   of  the  To  Data  Area  to  be
                 compared.   The  default  is  *FRMDTAARA  meaning  the
                 same data  area name  as in  the FRMDTAARA  parameter.
                 The library  value defaults to blanks.   If no name is
                 entered,  *LIBL  is  assumed.    *CURLIB  may  also be
                 used.

   FROMPOS       The  'from'  position  to  start  the  compare.    The
                 default is 1.   Only *CHAR data areas  may be compared
                 at a position greater than 1.

   TOPOS         The  'to' position  to end  the compare.   The default
                 is *END or  the last position based  on the length  of
                 the From  data area.   Only  *CHAR data  areas may  be
                 compared at a position other than *END.

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

The  type  of  data  areas must  be  the  same  (such  as both  *CHAR).
Decimal data  areas  must match  in  length and  decimal  positions  to
compare the values.

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

The following TAA Tools must be on your system:

     CHKOBJ3         Check object 3
     EDTVAR          Edit variable
     RTVDTAARAD      Retrieve data area description
     SNDCOMPMSG      Send completion message
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   CMPDTAARA     *CMD                   TAAARAI       QATTCMD
   TAAARAIC      *PGM       CLP         TAAARAIC      QATTCL
					

Added to TAA Productivity tools July 1, 1999


Home Page Up to Top