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


Using the WHENREG=YES Option

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

WHENREG=YES provides a way to serialize updates without obtaining a lock. For example, you might select this option if you are updating the data item and you want to be sure that the copy in your local cache buffer is still valid at the time the write operation takes place. If the copy in your local cache buffer is not valid, the request fails, and you must read the data item from the cache structure and request that your interest be re-registered. You can make updates to the copy in your buffer and write the updated data item to the cache structure. (Note that WHENREG=YES does not actually serialize the use of the data the way an external lock does, but only prevents you from writing data that is not valid in your local cache buffer to the cache structure.)

The VECTORINDEX keyword with WHENREG=YES is not supported with coupling facilities of CFLEVEL 0 or 1 and will be ignored. However, with a coupling facility of CFLEVEL=2 and higher, you can optionally specify the vector entry assigned to the data item with the VECTORINDEX keyword. If you code WHENREG=YES and your interest in the data item is registered with the same vector index as is specified on VECTORINDEX, the WRITE_DATA request will be processed. If you code WHENREG=YES and your interest in the data item is either not registered or registered with a different vector index, the WRITE_DATA request will fail with an IXLRSNCODENOENTRY reason code. In the latter case (where the vector index is different from that specified by VECTORINDEX), the system returns the vector index with which you are currently registered at the time of the failed request in the cache answer area.
  • CAALCVI is set ON to indicate that the value of the vector index specified on the request is different from the vector index with which you are currently registered.
  • CAALCVINUM contains the value of the vector index with which you are currently registered.

The system defaults are WHENREG=YES and VECTORINDEX=NO_VECTORINDEX.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014