A mixed list accepts a set of separately defined values.
These values usually have different meanings, are of different types, and are in a fixed position in the list. For example, LOG(4 0 *SECLVL) could specify a mixed list. The first value, 4, identifies the message level to be logged; the second value, 0, is the lowest message severity to be logged. The third value, *SECLVL, specifies the amount of information to be logged (both first- and second-level messages). If a parameter's value is a mixed list, the elements of the list must be defined separately using an Element (ELEM) statement for each element.
The TYPE parameter on the associated PARM statement must have a label that refers to the first ELEM statement for the list.
PARM KWD(LOG) TYPE(LOGLST) ... LOGLST: ELEM TYPE(*INT2) ... ELEM TYPE(*INT2) ... ELEM TYPE(*CHAR) LEN(7)
The first ELEM statement is the only ELEM statement that can have a label. Specify the ELEM statements in the order in which the elements occur in the list.
Note that when the MAX parameter has a value greater than 1 on the PARM statement, and the TYPE parameter refers to ELEM statements, the parameter being defined is a list within a list.
Parameters that you can specify on the ELEM statement include TYPE, LEN, CONSTANT, RSTD, DFT, VALUES, REL, RANGE, SPCVAL, SNGVAL, MIN, MAX, ALWUNPRT, ALWVAR, PGM, DTAARA, FILE, FULL, EXPR, VARY, PASSATR, CHOICE, CHOICEPGM, and PROMPT.
In the following example, a parameter CMPVAL is defined for which the display station user can specify a comparison value and a starting position for the comparison (a mixed list).
PARM KWD(CMPVAL) TYPE(CMP) SNGVAL(*ANY) DFT(*ANY) + MIN(0) CMP: ELEM TYPE(*CHAR) LEN(80) MIN(1) ELEM TYPE(*DEC) LEN(2 0) RANGE(1 80) DFT(1)
When the elements in a mixed list are passed to the command processing program, the format varies depending on whether you are using CL or HLL, or REXX.