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


Cast-out Requests

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

To read the data item for cast-out, you issue a REQUEST=CASTOUT_DATA request. The system locks the data item for cast-out on your behalf, marks the data item unchanged and transfers the requested data to your storage. Locking the data item for cast-out prevents another user from concurrently casting out the same data item. Locking a data item for cast-out, however, does not prevent another user from reading the data item from the cache structure or from updating the data item in the cache structure.

After completion of the REQUEST=CASTOUT_DATA request, you must write the data item to permanent storage. After the write operation completes, you must release the cast-out lock by issuing either a REQUEST=UNLOCK_CASTOUT request or a REQUEST=UNLOCK_CO_NAME request. If other users have not updated the data while the cast-out lock is held, the system releases the cast-out lock and removes the data item from the cast-out class to which it had been assigned.

If you are unable to write the data item to permanent storage, you can request that the system mark the data item as changed when you release the lock on an UNLOCK_CASTOUT request or UNLOCK_CO_NAME request. By marking the data item as changed, you ensure that the data item's cache structure resources are not reclaimed before you, or another user, casts out the data item. Also, the data item remains associated with its cast-out class. (See Changing the Directory Entry for the Data Item.)

The data item is also marked as changed if another user updates the data item while you hold the cast-out lock. While you hold the lock, the data item being cast out is still available in the cache structure to be read or updated. If another user updates the data item in the cache structure while you hold the lock, that user's request causes the data item to be marked changed and to be assigned to the specified cast-out class. When you issue the UNLOCK_CASTOUT or UNLOCK_CO_NAME request for the data item, the system still considers the data item to be associated with the cast-out class that the user specified when the data item was updated.

The cast-out process involves three major tasks:
  • Reading the data item for cast-out from the cache structure: To read a data item for cast-out, you issue a REQUEST=CASTOUT_DATA request. See IXLCACHE Functions for CASTOUT_DATA.
  • Writing the data item to its permanent storage: IXLCACHE does not provide services for writing the data item to permanent storage. You must use other system services to perform this task. See the topic for the method you use to access permanent storage.
  • Unlocking the cast-out lock: You must unlock the cast-out lock by issuing a REQUEST=UNLOCK_CASTOUT or REQUEST=UNLOCK_CO_NAME request. See UNLOCK_CASTOUT: Releasing Cast-Out Locks and UNLOCK_CO_NAME: Releasing a Single Cast-Out Lock.

Plan to process an entire cast-out class at a time. Perform the first two steps for each data item in the class, and then the third step, passing all the names that were cast out in a list.

Guide to the Topic

CASTOUT_DATA: Casting Out Data from a Cache Structure is divided into two topics.

The second topic, Casting Out A Data Item: Summary summarizes a procedure for casting-out data from a cache structure.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014