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


Using the Version Number to Serialize List Entry Operations

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

By adhering to a protocol of updating the version number when you update a list entry's contents, you can avoid corrupting or deleting changes made to the entry by other users. For instance, you could establish the following procedure for updating list entries:

  1. Read a list entry
  2. Update its contents
  3. Increment, decrement, or set the version number of the updated copy of the list entry
  4. Write the changes back to the list entry using the VERSCOMP parameter to ensure that the list entry is updated only if its version number is still the same as when you read it.

If the version number comparison fails, the write request is not performed and you must start the update process again after re-reading the current list entry.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014