z/OS MVS Programming: Sysplex Services Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Understanding the List Cursor

z/OS MVS Programming: Sysplex Services Guide
SA23-1400-00

A list cursor is associated with each list. It acts as a pointer that you can move back and forth on the list. Its most natural use is to enable a set of users to cooperate in the processing of a list. For instance, if the list represented units of work to be performed, the list cursor could be used as follows. After initializing the list cursor to point to a list entry, users seeking work would:
  • Read the entry pointed to by the list cursor (the next entry that needs processing) and move the list cursor to the next entry. (The list service performs these two actions atomically on a READ request with UPDATECURSOR=YES and CURSORUPDTYPE=NEXT or NEXTCOND.)
  • Process the entry just read.

In this example, once the list cursor reaches the end of the list, the list service resets the list cursor to zero. When a list cursor points to a list entry, it contains the entry ID of that list entry.

For list structures allocated in a coupling facility with CFLEVEL=1 or higher, when you are running on an MVS™ SP 5.2 system with version one of the IXLLIST macro:
  • There are additional cursor update options
  • The list cursor update can be conditional, that is, the update occurs only if another condition is true at the time.
  • The cursor can be made to point to the current entry instead of the previous or next entry.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014