TAA Tools
EXTLST3         EXTRACT LIST 3                         TAACLTQ

The Extract List 3  command accepts input from a  simple list parameter
passed  from a  command and  returns  a value  that is  suitable  to be
moved  to  a variable  for listing  or displaying  in  a message.   One
space would  exist  between each  value returned.    The command  would
typically be  part of  a CPP  that needs to  make the  list displayable
and not as it is passed to the program.

The following would be typical code:

              DCL       &LIST *CHAR LEN(5000)
              DCL       &RTNLIST *CHAR LEN(5000)
              DCL       &DSPVAL *CHAR LEN(100)
               .
                        /* Assume this is a CPP which is passed    */
                        /*   the &LIST variable which contains     */
                        /*   a list of 10 byte values where some   */
                        /*   of the values have less than 10 bytes */
                        /*   of data.                              */
                        /*                                         */
              EXTLST3   LIST(&LIST) ELMLEN(10) RTNLIST(&RTNLIST)
              CHGVAR    &DSPVAL &RTNLIST
                        /*                                         */
                        /*   &DSPVAL may now be used to display    */
                        /*                                         */

Assume  the  command that  returns  a list  requests  the authorization
types to be checked.  If the parameter had been specified as:

              LIST(*OBJMGT *OBJOPR *READ *UPDATE)

and the command allows  for 10 bytes for  each value, the value  passed
to the CPP would be:

              'nn*OBJMGT   *OBJOPR   *READ     *UPDATE     ...'

The nn  value would be  a binary  value of 4  for the number  of values
passed.

EXTLST3 would  return the list in 5000 bytes which  could be moved to a
display variable that would appear as:

              '*OBJMGT *OBJOPR *READ *UPDATE'

EXTLST3 escape messages you can monitor for
-------------------------------------------

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

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

   LIST          The simple  list as  passed from  a command  to a  CPP
                 with the first  two bytes as  the count of  the number
                 of values in binary.

   ELMLEN        The element  length.  The value must be  in a range of
                 1 to 100

   RTNLIST       The  return list  with one  space between  each value.
                 A variable of *CHAR LEN(5000) is required.


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

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

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

The following TAA Tools must be on your system:

     EXTLST          Extract list
     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
   ------        ----    ---------      ----------    ----------

   EXTLST3       *CMD                   TAACLTQ       QATTCMD
   TAACLTQC      *PGM       CLP         TAACLTQC      QATTCL
					

Added to TAA Productivity tools April 15, 2011


Home Page Up to Top