LIST

The LIST option can be used with the following positional operand types: USERID, DSNAME, DSTHING, ADDRESS, VALUE, CONSTANT, VARIABLE, STATEMENT NUMBER, HEX, INTEG, CHAR, and any non-delimiter-dependent positional operand.

If you specify the LIST option in the parse macro instructions describing the positional operand types listed above, the parse service routine allocates an additional word for the PDE created to describe the positional operand. This word is allocated even though the terminal user cannot actually enter a list. If a list is not entered, this word is set to X'FF000000'. If a list is entered, the additional word is used to chain the PDEs created for each element found in the list.

Each additional PDE has a format identical to the one described for that operand type within the IKJPARMD DSECT. Because the number of elements in a list is variable, the number of PDEs created by the parse service routine is also variable. The chain word of the PDE created for the last element of the list is set to X'FF000000'.

Figure 1 shows the PDL returned by the parse service routine after three positional operands have been entered. In this case, the first two operands, a USERID and a STRING operand, had been defined as not accepting lists. The third operand, a VALUE operand, had the LIST option coded in the IKJPOSIT macro instruction that defined the operand syntax. The VALUE operand was entered as a two-element list.

Figure 1. A PDL showing PDEs that describe a list