The GETPOOL macro builds a buffer pool in a storage area acquired by the system. The system places the address of the buffer pool control block in the BUFCB field of the data control block. If you choose to issue the GETPOOL macro for QSAM and QISAM, then issue it either before an OPEN macro is issued or during the OPEN data control block exit routine for the specified data control block. Otherwise, the system will build an appropriate buffer pool for you. Do not issue the GETPOOL macro if you wish QSAM buffers to be above the 16MB line.
If you choose to issue the GETPOOL macro for BDAM, BISAM, BPAM, or BSAM, then issue it before you issue the GETBUF macro. Remember that if the BUFNO parameter is supplied in the data control block before completion of the OPEN DCB exit routine, then OPEN will build a buffer pool and your program should not issue GETPOOL. You may choose to supply BUFNO when the data set is allocated to the program (on the DD statement) and not clear BUFNO in the DCB before completion of the OPEN DCB exit routine.
The GETPOOL 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 format of the GETPOOL macro is:
[label] | GETPOOL | dcb address |
---|
The value you specify can be either a positive or a negative value. If this parameter has the high-order bit on (for example, to signify the last address in a list), this bit must be reset to zero. Otherwise, the address will be treated as a negative value. When issued in 31-bit addressing mode, the input DCB address must be a clean 31-bit address. The resulting buffer pool always resides below the 16MB line.
Your program releases the buffer pool and the associated storage area by issuing a FREEPOOL macro after issuing a CLOSE macro for the data set indicated in the specified data control block.