BUILDRCD—Build a buffer pool and a record area (QSAM)

The BUILDRCD macro builds a buffer pool and a record area in an area of storage you provide. This macro is used only for variable-length, spanned records processed in QSAM locate mode. If the extended logical record interface (XLRI) is used to process RECFM=DS or RECFM=DBS records (ISO/ANSI/FIPS variable spanned or variable blocked spanned), you can use the BUILDRCD macro to build a record area to a maximum length of 16777183 bytes. Using this macro before the data set is opened, or before the end of the DCB open exit routine, provides a buffer pool that can be used for a logical record interface rather than a segment interface for variable-length spanned records. To invoke a logical record interface, specify BFTEK=A in the data control block (DCB). You cannot specify the BUILDRCD macro when logical records exceed 32 760 bytes.

You must release the buffer pool and the record area after issuing a CLOSE macro for all the data control blocks that use the buffer pool and the record area.

The BUILDRCD macro may be issued in 24- or 31-bit addressing mode. When issued in 31-bit addressing mode, all addresses must be valid 31-bit addresses.

The standard form of the BUILDRCD macro is as follows (the list and execute forms are shown following the description of the standard form):

area address—A-Type Address or (2-12)
specifies the address of the area used as a buffer pool. The area must start on a fullword boundary. When issued in 31-bit addressing mode, the input area address must be a clean 31-bit address and it must reside below the line. BUILDRCD does not support buffers above the line.

area length = [(buffer length) * (number of buffers) + 12]

number of buffers—symbol, decimal digit, absexp, or (2-12)
specifies the number of buffers, to a maximum of 255, in the buffer pool.
buffer length—symbol, decimal digit, absexp, or (2-12)
specifies the length, in bytes, of each buffer in the buffer pool. The value specified for the buffer length must be a fullword multiple; otherwise, the system rounds the value specified to the next higher fullword multiple. The maximum length that can be specified is 32 760 bytes.
record area address—A-Type Address or (2-12)
specifies the address of the storage area that is used as a record area. The area must start on a doubleword boundary and have a length of the maximum logical record (LRECL) plus 32 bytes. When issued in 31-bit addressing mode, the record area address must be a clean 31-bit address and it must reside below the line. BUILDRCD does not support buffers above the line.
record area length—symbol, decimal digit, absexp, or (2-12)
specifies the length of the record area that is used. The area must be as long as the maximum length logical record plus 32 bytes for control information. If the record area length is omitted, the problem program must store the record area length in the first 4 bytes of the record area.