In QSAM, the value of BUFNO determines how many buffers will be
chained together before I/O is initiated. The default value of BUFNO
is described in Constructing a Buffer Pool Automatically. When enough buffers are available
for reading ahead or writing behind, QSAM attempts to read or write
those buffers in successive revolutions of the disk. If you do not
set a non-zero value for MULTSDN on the DCBE macro or BUFNO on the
DCB macro before completion of the DCB OPEN exit, then OPEN provides
a default value for BUFNO as described in Constructing a Buffer Pool Automatically.
If you code a MULTSDN value when the following conditions
occur, the system calculates a more efficient BUFNO value for QSAM
or NCP value for BSAM or BPAM:
- MULTSDN has a nonzero value.
- DCBBUFNO for QSAM is zero after the completion of the DCB OPEN
exit routine or DCBNCP for BSAM or BPAM is zero before entry to the
DCB OPEN exit routine..
- The data set block size is available.
If the preceding criteria are met,
- OPEN first calculates an appropriate initial value:
- DASD data sets that are not extended format data sets: the initial
value is the number of BLKSIZE-length blocks that can fit on a track.
- Extended format data sets (not in the compressed format): the
initial value is the number of stripes multiplieD by the number of
BLKSIZE-length blocks (plus the suffix) that can fit on a track.
- Tape data sets with a block size less than 32 KB: the initial
value is the number of BLKSIZE-length blocks that can fit within 64
KB.
- Tape data sets with a block size equal to or greater than 32 KB:
the initial value is 2.
- If the result exceeds 255, OPEN reduces it to 255.
- The system then multiplies the value by the number specified in
MULTSDN. If the result exceeds 255, OPEN reduces it to 255.
- OPEN stores the value in DCBBUFNO for QSAM or in DCBNCP for BSAM
or BPAM.
For better performance with BSAM and BPAM, use the technique described
in Using Overlapped I/O with BSAM and Figure 3.
For sequential data sets and PDSs, specifying a nonzero MULTACC
value on a DCBE macro can result in more efficient channel programs.
You can also code a nonzero MULTSDN value. If MULTSDN is nonzero and
DCBNCP is zero, OPEN determines a value for NCP and stores that value
in DCBNCP before giving control to the DCB open exit. If MULTACC is
nonzero and your program uses the WAIT or EVENTS macro on a DECB or
depends on a POST exit for a DECB, then you must precede that macro
or dependence by a CHECK or TRUNC macro.
Note:
- For compressed format data sets, MULTACC is ignored since all
buffering is handled internally by the system.
- For tape data sets using large block interface (LBI) that have
a block size greater than 32␠768, the system-determined
NCP value is between 2 and 16. If the calculated value is <2, it
is set to 2, and if it is >16, it is set to 16.
- The system does not change DCBNCP between OPEN and CLOSE.
- In a sequential concatenation, QSAM might change the BUFNO value
or build a new buffer pool when making the transition between data
sets or do both.