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


Let the System Select QSAM BUFNO or BSAM or BPAM NCP

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

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,

  1. 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.
  2. If the result exceeds 255, OPEN reduces it to 255.
  3. The system then multiplies the value by the number specified in MULTSDN. If the result exceeds 255, OPEN reduces it to 255.
  4. 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:

  1. For compressed format data sets, MULTACC is ignored since all buffering is handled internally by the system.
  2. 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.
  3. The system does not change DCBNCP between OPEN and CLOSE.
  4. 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.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014