Use CL or HLL 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 CL or a high-level language.

When a command is run using CL or HLL, a list within a list is passed to the command processing program in the following format:


When a command is run using CL or HLL, a list within a list is passed to the command processing program in the this format.

The number of lists is passed as a binary value of length 2. Following the number of lists, the displacement to the lists is passed (not the values that were entered in the lists). Each displacement is passed as a binary value of length 2 or length 4 depending on the value of the LISTDSPL parameter.

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)  LISTDSPL(*INT2)
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:


Example of what is passed to the command processing program when the display station user enters the KWD2 parameter as 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:

Example of what is passed to the command processing program when the display station user enters KWD2((A B) (C D)).

Lists within a list are passed to the command processing program in the order n (the last one entered by the display station user) to 1 (the first one entered by the display station user). The displacements, however, are passed from 1 to n.

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)
 
If the display station user enters the PARM1 parameter as shown in the following example:
PARM1(((11.1  120900)  A  (A1  A2))  ((-22.2  131500)  B  (B1  B2)))
the following is passed to the command processing program:

Example of what is passed if the display station user enters the PARM1 parameter as PARM1(((11.1 120900) A (A1 A2)) ((-22.2 131500) B (B1 B2))).