You are a store-through user who plans to use a data item but not
update it. Serializing this process ensures that no one updates the
data item while you hold the lock.
- Obtain a shared lock by using the IXLLOCK macro. Holding a shared
lock enables others to also use, but not update, the data item.
- 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.
- If a copy does not exist in the 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.
- If the data item is not in the cache structure, read it from permanent
storage into the local cache buffer.
- Use the data item as needed.
- If the data item has been read from permanent storage, use IXLCACHE
REQUEST=WRITE_DATA to write it to the cache so the system can register
your interest. Otherwise, skip this step and go directly to step 7.
- Use the IXLLOCK macro to free the shared lock.