The following circumstances cause the list cursor to stop pointing
to a valid list entry and get reset to zero:
- If you specify UPDATECURSOR=NO and the entry to which the list
cursor points is deleted or moved to another list. Since the list
cursor no longer points to a list entry on that list, the list cursor
is reset to zero. Figure 1 illustrates
this scenario.
- If you specify UPDATECURSOR=YES with LISTDIR=TOHEAD and CURSORUPDTYPE=NEXT
and the list cursor is already pointing to the head entry on the list.
Since there is no entry before the head entry, the list cursor is
reset to zero. Figure 2 illustrates
this scenario.
- If you specify UPDATECURSOR=YES with LISTDIR=TOTAIL and CURSORUPDTYPE=NEXT
and the list cursor is already pointing to the tail entry on the list.
Since there is no entry after the tail entry, the list cursor is reset
to zero. Figure 3 illustrates this
scenario.
- For a structure allocated in a coupling facility of CFLEVEL=1
or higher,
- If you specify CURSORUPDTYPE=NEXTCOND and the cursor direction
is set in a tail-to-head direction and the list cursor is already
pointing to the head entry on the list
- If you specify CURSORUPDTYPE=NEXTCOND and the cursor direction
is set in a head-to-tail direction and the list cursor is already
pointing to the tail entry on the list.
- For a structure allocated in a coupling facility of CFLEVEL=1
or higher, if you specify CURSORUPDTYPE=CURRENT and the entry to which
the list cursor points is deleted or moved to another list.
When the list cursor is reset to zero, you must re-initialize it
as described above before using it again to designate an entry with
LOCBYCURSOR.
Figure 1. List Cursor After the List Entry is Deleted
Figure 2. List Cursor When Moved Before the First List
Entry
Figure 3. List Cursor When Moved After the Last List Entry
Figure 4. List Cursor When Moved Conditionally Before First
Entry
Figure 5. List Cursor When List Entry Is Deleted