z/OS DFSMS Macro Instructions for Data Sets
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


WRTBFR—Write buffer

z/OS DFSMS Macro Instructions for Data Sets
SC23-6852-02

If you are using local or global shared resources, you can use the WRTBFR macro to write a buffer.

The format of the WRTBFR macro is:

label
specifies 1 to 8 characters that provide a symbolic address for the WRTBFR macro.
RPL=address
specifies the address of the request parameter list that defines the WRTBFR request. An RPL need not be built especially for the WRTBFR. WRTBFR may use an inactive RPL that defines other requests (GET, PUT, and so forth) for a data set using the resource pool. The following RPL parameters have meaning for WRTBFR:
ACB=address
ARG=address
For TYPE=DRBA, the address of a 4-byte field that contains the RBA to be located and written. For compressed data sets, the RBA of another record or the address of the next record in a buffer cannot be determined using the length of the current record or the length of the record provided to VSAM.

For extended addressing, the address of an 8-byte field that contains the RBA to be located and written.

ECB=address
 
OPTCD={ASY|SYN}
WRTBFR can be issued synchronously (SYN) or asynchronously (ASY). A CHECK or ENDREQ must be issued to synchronize an asynchronous WRTBFR request.
TRANSID=abs expression
specifies a number from 0 to 31.

All other RPL parameters are ignored. RPLs are assumed not to be chained.

If the ACB to which the RPL is related has MACRF=GSR, the program issuing WRTBFR must be in supervisor state with protection key 0 to 7.

TYPE={ALL|CHK|DRBA|DS|LRU(percent)|TRN}
specifies which buffers are to be written.

Rule: Before using WRTBFR TYPE=CHK|DRBA|TRN, be sure to release all buffers. VSAM defers processing until all buffers are released. For details about releasing buffers, see z/OS DFSMS Using Data Sets.

ALL
specifies that all modified unwritten index and data buffers in each buffer pool in the resource pool are to be written. All buffers with physical errors from WRTBFR are invalidated. Closing all the data sets that use a resource pool causes the same buffers to be written.
CHK
is the same as TRN (below), but, if any error occurs in writing buffers, transaction IDs continue to be associated with the buffers. If there are no errors, transaction IDs are no longer be associated with the buffers. WRTBFR TYPE=CHK can be used by a checkpoint routine to record checkpoint information and leave buffers for which an error occurred as they were for continued processing.
DRBA
specifies that one of the data set's data buffers is to be written. The buffer to be written is identified with the RBA pointed to by the RPL ARG address.
DS
specifies that, for the data set defined by the ACB to which the WRTBFR's RPL is related, all modified unwritten index and data buffers are to be written and all buffers (including the Hiperspace™ buffers) are to be marked empty, that is, invalidated. Therefore, WRTBFR TYPE=DS should be issued only after all VSAM requests for the data set have been quiesced. Otherwise, the results might be unpredictable.
LRU(percent)
specifies that some of the modified buffers in each buffer pool in the resource pool are written. The percent is the percentage of buffers in each pool that are examined for possible writing. The least recently used buffers are examined. (If percent is coded in register notation, only registers 1 and 13 may not be used.)

TYPE=LRU is used for writing some modified buffers, without respect to a particular data set or transaction ID, to ensure that buffers are available for GET requests (without having to wait for buffers to be written).

TRN
specifies that all buffers in a buffer pool that are modified by requests with the transaction ID that is specified in the WRTBFR's RPL are to be written. Transaction IDs are no longer associated with these buffers if WRTBFR completes successfully, or if a physical error occurs. Otherwise, the transaction buffers are still associated with these buffers.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014