TAA Tools
CHKSELOMT       CHECK SELECT/OMIT                      TAACLTB

The Check  Select/Omit command allows  select and/or  omit lists to  be
checked  against a name  value.  The  lists may contain  generic names.
A  *YES/*NO  result field  is returned  to  assist in  your processing.
CHKSELOMT   simplifies   programming   when    performing   select/omit
processing of names against lists.

For  example, assume you  have extracted  a list  of program  names and
only want to process some of the names.

A typical series of commands would be:

              DCL       &RESULT *CHAR LEN(4)
              CHKSELOMT NAME(&xxx) RESULT(&RESULT)
                          SELECT(ABC DEF GH*)
              IF        (&RESULT *EQ '*SEL') DO /* Selected */
              ENDDO     /* Selected */

Only  the names ABC, DEF,  or matching the generic  name GHI would pass
back a result of *SEL.

Another typical command would be:

              CHKSELOMT NAME(&xxx) RESULT(&RESULT)
                          SELECT(ABC DEF GH*) OMIT(AB* MMM OOO)
              IF        (&RESULT *EQ '*SEL') DO /* Selected */
              ENDDO     /* Selected */

              IF        (&RESULT *EQ '*OMT') DO /* Omitted */
              ENDDO     /* Omitted */

              IF        (&RESULT *EQ '*NON') DO /* Non-specified */
              ENDDO     /* Non-specified */

Because SELECT  processing occurs  first, the  value  ABC would  return
*SEL even  though the OMIT  of AB* would cause  any other ABx  value to
be omitted.

If  a NAME such as  XXX is passed  to CHKSELOMT, it is  in neither list
and *NON would be returned for non-specified.

It is valid to have only a SELECT list or only an OMIT list.

If SELECT(*ALL)  and OMIT(*NONE)  are  specified, the  command  returns
normally with RESULT = *NON.

If both  lists are used, the  CMPCMDLST tool may  be used to  check the
lists to ensure that no illogical entries have been made.

CHKSELOMT escape messages you can monitor for

      TAA9891    The 'position to' key does not exist.

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

CHKSELOMT Command Parameters                          *CMD

   NAME          The name value to be be checked against the lists.

   RESULT        A required  return variable that must  be specified as
                 *CHAR  LEN(4).   The variable  will contain  *SEL (the
                 name was  found in  the SELECT list),  *OMT (the  name
                 was   found  in   the   omit  list),   or  *NON   (for
                 non-specified  because  the  name  was  not  found  in
                 either the SELECT or OMIT list).

   SELECT        A list  of up  to 300  names or  generic  names to  be
                 selected.   The  default  is  *ALL meaning  only  OMIT
                 processing will be performed.

   OMIT          A  list of  up to  300  names or  generic names  to be
                 omitted.   The default  is *NONE  meaning only  SELECT
                 processing will be performed.


Because CHKSELOMT returns a  variable, the command may only  be used in
a CL program.

Each  list must  be passed  from command  definition  (or appear  to be
passed  from command  definition) with  the leading  2 bytes describing
the number of entries in binary.


The following TAA Tools must be on your system:

     CHKGENERC       Check generic
     EXTLST          Extract list
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message


None, the tool is ready to use.

Objects used by the tool

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

   CHKSELOMT     *CMD                   TAACLTB       QATTCMD
   TAACLTBC      *PGM       CLP         TAACLTBC      QATTCL

Added to TAA Productivity tools September 15, 2007

Home Page Up to Top