To designate a list entry by list position, specify the list number
(LISTNUM) and the list position (LISTPOS).
- List number (LISTNUM)
- Designates a specific list in the list structure. The first
connector to the list structure uses the LISTHEADERS parameter on
the IXLCONN macro to specify the number of lists to be allocated in
the list structure. List numbers in a list structure range from 0
to the LISTHEADERS value minus one.
- List position (LISTPOS)
- Designates the head or tail of list position. Possible values
are HEAD or TAIL.
You can create a LIFO (last in, first out) or
FIFO (first in, first out) queue or a stack by using LISTPOS to control
how list entries are added to and removed from the list.
If
there is only one list entry on the list, it is selected whether you
specify LISTPOS=HEAD or LISTPOS=TAIL. Figure 1 illustrates
the use of LISTPOS to reference list entries.
Figure 1. Use
of List Position