z/OS DFSMS Using Data Sets
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Writing Buffers Whose Writing is Deferred: WRTBFR

z/OS DFSMS Using Data Sets
SC23-6855-00

If any PUTs to a data set using a shared resource pool are deferred, you can use the WRTBFR (write buffer) macro to write:
  • All modified unwritten index and data buffers for a given data set (which causes all Hiperspace buffers for the data set to be invalidated)
  • All modified unwritten index and data buffers in the resource pool
  • The least recently used modified buffers in each buffer pool of the resource pool
  • All buffers modified by requests with the same transaction ID
  • A buffer, identified by an RBA value, that has been modified and has a use count of zero

You can specify the DFR option in an ACB without using WRTBFR to write buffers. A buffer is written when VSAM needs one to satisfy a GET request, or all modified buffers are written when the last of the data sets that uses them is closed.

Besides using WRTBFR to write buffers whose writing is deferred, you can use it to write buffers that are marked for output with the MRKBFR macro, which is described in Marking a Buffer for Output: MRKBFR.

Using WRTBFR can improve performance, if you schedule WRTBFR to overlap other processing.

VSAM notifies the processing program when there are no more unmodified buffers into which to read the contents of a control interval. (VSAM would be forced to write buffers when another GET request required an I/O operation.) VSAM sets register 15 to 0 and puts 12 (X'0C') in the feedback field of the RPL that defines the PUT request that detects the condition.

VSAM also notifies the processing program when there are no buffers available to which to assign a placeholder for a request. This is a logical error (register 15 contains 8 unless an exit is taken to a LERAD routine); the feedback field in the RPL contains 152 (X'98'). You may retry the request; it gets a buffer if one is freed.

When sharing the data set with a user in another region, your program might want to write the contents of a specified buffer without writing all other modified buffers. Your program issues the WRTBFR macro to search your buffer pool for a buffer containing the specified RBA. If found, the buffer is examined to verify that it is modified and has a use count of zero. If so, VSAM writes the contents of the buffer into the data set.

Recommendation: Before you use WRTBFR TYPE=CHK|TRN|DRBA, be sure to release all buffers. See Processing Multiple Strings for information about releasing buffers. If one of the buffers is not released, VSAM defers processing until the buffer is released.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014