z/OS Network File System Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using fastfilesize to avoid read-for-size

z/OS Network File System Guide and Reference
SC23-6883-00

If you can use an approximate file size for a PDS, PDSE, DA, or non-system-managed data set, you can specify the fastfilesize attribute to improve performance. With this attribute, the server estimates the size without opening and reading the entire file.

PDS members
For PDS members, the fastfilesize attribute gets the file size from the ISPF statistics, if they exist. Otherwise, a file size of 0 is returned.

For PDSE members, the fastfilesize attribute gets the file size from the ISPF statistics, if they exist. If the ISPF statistics do not exist, it gets the file size from the attribute extension in the AX cell, if it exists and is valid. If neither is available, a file size of 0 is returned.

Warning: A file size of zero (0) may result in unpredictable behavior from client applications when the PDS/PDSE member actually contains data. Therefore, it is recommended to provide ISPF statistics for the PDS/PDSE members, or to use nofastfilesize.

DA data sets
For direct access (DA) data sets, an approximate file size is calculated based on the device characteristics, the number of disk tracks in use, and the block size of the data set.
VSAM
For non-system-managed VSAM data sets, the estimated size using fastfilesize is zero. Therefore, such commands as cat or vi will usually not show any data. In some instances, if the NFS server already has the actual file size cached, data may be shown. Once the cache times out, however, the size is lost and the commands do not show any data.

The fastfilesize attribute speeds up data set access by calculating approximate file sizes during data set access. Use this only when you are browsing through files (using the ls UNIX command for example) because some commands (such as cp or copy) might not work correctly if fastfilesize is set. When reading or modifying a data set, the nofastfilesize attribute should be used to ensure accurate results.

For SMS-managed Extended Format data sets, the fastfilesize estimated file size is calculated based on the DFSMS DCBE and DSCB control blocks. It is set to the maximum of the following two values:
  • The DFSMS estimated number of blocks in the data set (DCBESIZE) multiplied by the block size
  • The estimated number of bytes within all of the data set's DASD tracks with data.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014