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


Updating Data in a Store-in cache

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

You are a store-in user who plans to update the data item and then write it back to the cache structure. Serializing this process ensures that no other user can use or update the data item while you hold the lock.

  1. Obtain an exclusive lock by using the IXLLOCK macro. Holding an exclusive lock ensures that no other user can use or update the data item.
  2. If there is a copy of the data item in your local cache buffer, use the IXLVECTR macro to determine if the copy is valid. If the copy is valid, go to step 5.
  3. If a copy does not exist in your local cache buffer or the copy is no longer valid, use IXLCACHE REQUEST=READ_DATA to read the data item from the cache structure. If the data item is in the cache structure, go to step 5. If a local cache buffer is not assigned to the named data item, assign the local cache buffer and use a protocol to assign a vector entry to the buffer.
  4. If the data item is not in the cache structure, read it from permanent storage into the local cache buffer.
  5. Update the data item in the local cache buffer.
  6. Use IXLCACHE REQUEST=WRITE_DATA to write the updated data item to the cache structure. To invalidate copies of the data item for other users, specify CHANGED=YES on the IXLCACHE request.
  7. Use the IXLLOCK macro to free the exclusive lock.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014