TAA Tools
CMPLSTPARM      COMPARE LIST PARAMETERS                TAACMEL

The Compare  List  Parameters command  allows the  comparisons of  list
values  passed to  a CL  program from  a command  that uses  two lists.
The  intent of the tool is  to be used when  a command being checked in
a CPP  supports a  list of  items to  include and  a list  of items  to
omit.  An error occurs if both lists contain the same value.

Assume  a command allows  a user  to enter  a list  of libraries  to be
processed and  a list of libraries to be  omitted.  The user enters the
following:

         XXCmd       LIB(LIBA LIBB LIBC) OMTLIB(LIBA)

The user has made an error because LIBA is in both lists.

The CPP to process the command  would use the following type of  coding
to  check  this  -  Assume  each  list  keyword  specified  as  LEN(10)
MAX(40):

            DCL            &LIBLST *CHAR LEN(402)
            DCL            &OMTLIBLST *CHAR LEN(402)
             .
            CMPLSTPARM     LIST1(&LIBLST) LIST2(&OMTLIBLST)
            MONMSG         MSGID(TAA9891) EXEC(DO) /* Dup in lists */
                           /*                                      */
                           /*    Your code to handle duplicates    */
                           /*                                      */
            ENDDO          /* Dup in lists */

The  list  variables must  include  the  2 byte  binary  value  that is
passed from a command that uses a list parameter.

The escape message TAA9891  would be sent if  the same value exists  in
both lists.

The TYPE parameter  defaults to process names which  will automatically
bypass  a special  value (beginning  with an  *).   Generic  values may
also   exist,  but   TYPE(*GENERIC)  must   be  specified.     See  the
description of the TYPE parameter

Note  that  the  command  only  supports  a  simple  list  such  as  an
unqualified name.   Qualified names and mixed lists  are not supported.

CHKDUPLST Tool
--------------

A  separate tool exists to  ensure that values entered  into a list are
unique.  See the CHKDUPLST command.

CMPLSTPARM escape messages you can monitor for
----------------------------------------------

      TAA9891    A duplicate value (or generic value) exists.

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

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

   LIST1         The first  list.   Up to  5000 bytes  may be  entered.
                 The first  two bytes  must be a  binary number  of how
                 many  elements   exist  in  the  list   (this  is  the
                 standard method  used by  commands  that pass  a  list
                 parameter).

   LIST2         The second  list.  Up  to 5000  bytes may be  entered.
                 The  first two bytes  must be  a binary number  of how
                 many   elements  exist  in  the   list  (this  is  the
                 standard method  used  by commands  that pass  a  list
                 parameter).

   TYPE          The  type of  value that  exists in  both lists.   The
                 default  is  *NAME  meaning  that  object  names  (not
                 qualified) exist.   The  ELMLEN value  must  be 10  or
                 less.

                 If  TYPE(*NAME) is  specified and  the first  position
                 of  a name  in either  list  begins with  an *,  it is
                 assumed to be  a special  value and is  bypassed as  a
                 valid value.

                 If generic names appear, they will cause an error.

                 If  TYPE(*GENERIC) is  specified,  special values  are
                 also bypassed as described for TYPE(*NAME).

                 Generic  values  may  exist  in  either list.    If  a
                 generic  value exists in LIST1,  the value is bypassed
                 as a valid  value.  For example  the user may want  to
                 include  ABC*  values,  but  want  to  omit  the  ABCD
                 value.

                 However,  if the user wants to  include ABC, he cannot
                 omit A*, AB* or *ABC*.

                 The length of  the generic value in  LIST2 is used  as
                 the comparison length against the values in LIST1.

                 If  TYPE(*CHAR) is  specified,  no  special values  or
                 generic  considerations  exist.    If  any  duplicates
                 appear, an escape message is sent.

   ELMLEN        The length of the element  in each list.  The  default
                 is 10.   For  TYPE(*NAME) or  TYPE(*GENERIC), it  must
                 be 10 or less.

                 For TYPE(*CHAR), it must be between 1 and 100.

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

Several  restrictions  exist such  as  both lists  must  have the  same
length  elements  and  only simple  names  can be  used  (not qualified
names).  See the previous comments.

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

The following TAA Tools must be on your system:

     CHKGENERC       Check generic
     EXTLST          Extract list
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   CMPLSTPARM    *CMD                   TAACMEL       QATTCMD
   TAACMELC      *PGM       CLP         TAACMELC      QATTCL
					

Added to TAA Productivity tools April 23, 2001


Home Page Up to Top