Use REXX for lists within lists

This describes the format in which elements in a list within a list are passed when a command is run using REXX.

When a command is run using REXX, a list within a list is passed to the command processing program just as the values are entered for the parameters. Trailing blanks are not passed.

The following example shows a definition for a parameter KWD2, which is a mixed list within a simple list, how the parameter can be specified by the display station user, and what is passed. The parameter definition is:

       PARM    KWD(KWD2)    TYPE(LIST) MAX(20) MIN(0) +
               DFT(*NONE)  SNGVAL(*NONE)
LIST:  ELEM    TYPE(*CHAR)  LEN(10) MIN(1)       /*From value*/
       ELEM    TYPE(*CHAR)  LEN(5) MIN(0)        /*To value*/

The display station user enters the KWD2 parameter as:

KWD2((A B))

The following is passed to the command processing program:

KWD2(A B)

If the display station user enters the following instead:

KWD2((A B) (C D))

The following is passed to the command processing program:

KWD2((A B) (C D))

The following is a more complex example of lists within lists. The parameter definition is:

        PARM    KWD(PARM1)  TYPE(LIST3)  MAX(25)
LIST3:  ELEM    TYPE(LIST4)
        ELEM    TYPE(*CHAR)  LEN(3)
        ELEM    TYPE(*NAME)  LEN(2)  MAX(5)
LIST4:  ELEM    TYPE(*DEC) LEN(7 2)
        ELEM    TYPE(*TIME)
 

The display station user enters the PARM1 parameter as:

PARM1(((11.1  12D900)  A  (A1  A2))  ((-22.2  131500)  B  (B1  B2)))

The following is passed to the command processing program:

PARM1(((11.1  12D900)  A  (A1  A2))  ((-22.2  131500)  B  (B1  B2)))