z/TPF - Group home

PI24741: Prefetch prime block processing

  

You can use prefetch prime block processing to open multiple z/TPFDF subfiles and initiate find processing for the prime addresses of all the opened subfiles with as little as one WAITC macro or waitc function required.

When a z/TPFDF subfile is opened, the only processing that is done is the SW00SR slot in the database interface block (DBIFB) is set up. Each time a subfile is accessed for the first time, z/TPFDF issues a find API to retrieve the prime block from DASD, and then z/TPFDF issues a WAITC macro or waitc function to wait for completion of the single I/O operation. If numerous subfiles need to be accessed, these accesses occur sequentially.

With this enhancement, a more efficient mechanism is provided to essentially open and access multiple subfiles in parallel (that is, the I/O is done in parallel with as little as a one wait request).  Using this mechanism, the time that is needed to wait for completion of I/O operations for the ECB is reduced because multiple I/O operations can be completed in parallel.  Open processing might still need to issue more than one wait request if a HOLD is requested on the open API, depending on the circumstances.  The details of these circumstances are documented with the DBOPN and dfopn programming considerations.

The best candidates to use prefetch prime processing are applications that:

  • Are opening top level index subfiles
  • Have a low chance of update collisions or are opening the subfiles without a hold (lock).

One example of how this functionality might be used is a cleanup utility that needs to loop through thousands of subfiles within a file.  Prior to this support, the utility would have to open one subfile at a time while iterating through thousands of subfiles.  With this support, the utility can open many subfiles concurrently (up to the installation-specific limit of many subfiles can be opened at one time).

Use the following APIs to manage prefetch prime block processing:

  • The DBOPN macro with the PREFETCH parameter specified
  • The dfopn function with the DFOPN_PREFETCH_PRIME value specified
  • The DBWAIT macro
  • The dfwait function

For more information, see the APEDIT for APAR PI24741.