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


Buffer Requirements

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

The only case in which you will ever have to compute the buffer length (BUFL) requirements for your program occurs when you use the BUILD or GETPOOL macro to construct the buffer area. If you are creating an indexed sequential data set (using the PUT macro), each buffer must be 8 bytes longer than the block size to allow for the hardware count field. That is:
One exception to this formula arises when you are dealing with an unblocked format-F record whose key field precedes the data field; its relative key position is 0 (RKP=0). In that case, the key length must also be added:

The buffer requirements for using the queued access method to read or update (using the GET or PUTX macro) an indexed sequential data set are discussed below.

For fixed-length unblocked records when both the key and data are to be read, and for variable-length unblocked records, padding is added so that the data will be on a doubleword boundary, that is:

For fixed-length unblocked records when only data is to be read:

The buffer area for fixed-length blocked records must be:

Tip: When you use the basic access method to update records in an indexed sequential data set, the key length field need not be considered in determining your buffer requirements.

For variable-length blocked records, padding is 2 if the buffer starts on a fullword boundary that is not also a doubleword boundary, or 6 if the buffer starts on a doubleword boundary. The buffer area must be:

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014