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


Multiple Volume Considerations for Sequential Data Sets

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

Consider the following when working with multiple volumes: Your program is extending a sequential data set if it uses the EXTEND or OUTINX option of OPEN or it uses the OUTPUT or OUTIN option of OPEN with DISP=MOD on the DD statement. If you plan to rewrite a multivolume sequential data set that is not SMS managed, and you might later extend the data set, you should delete and reallocate the data set. This avoids the problems described in item 2 below and the system will extend on the volume that you want.

  1. When writing to a sequential data set, EOV turns off the last volume bit as it finishes each volume and CLOSE turns on the last volume bit in the DSCB on the current volume. It identifies the last volume containing data, not necessarily the last volume allocated to the data set. The DSCB on a later volume can also have this bit on, either due to earlier writings or due to guaranteed space.
  2. Writing with the DISP=MOD, OPEN EXTEND, or OUTINX option works differently with system-managed and non-system-managed data sets. On system-managed volumes, OPEN determines where to start writing using the following algorithm. No matter which volume you finish writing on, OPEN will find that volume to resume. Starting with the first volume, OPEN searches for the last volume bit. The first new block will be written immediately after the previous last block. If the old last block was short, it does not get larger. This specifically applies to SMS volumes.

    Writing with the DISP=MOD, OPEN EXTEND, or OUTINX option on non-SMS volumes, OPEN determines where to start writing using the following algorithm: It looks first on the last volume in the JFCB or its extensions to see if its DSCB has the last volume bit ON. If it is not ON, OPEN searches the other volumes in order starting with the first volume. This means that if the last volume and an earlier volume each have the last volume bit ON, your added data will not be reachable when reading sequentially.

    For striped data sets, which are SMS only, the last volume bit works a little different but it has the same effect as for other SMS data sets. The bit is ON on the last volume, even if that volume does not contain the last record of the data set. OPEN uses the DS1LSTAR fields to calculate the volume containing the last record.

  3. With partial release, CLOSE releases the unused space only on the current volume except for VSAM extended format data sets or for a striped data set that has a stripe count of greater than 1.

    For VSAM extended format data sets, partial release at CLOSE releases unused space from multiple volumes as follows. In non-EAV data sets, the starting point for freeing space is at a CA boundary; all space after the last used CA boundary is freed in a partial release, up to the high allocated RBA. In EAV data sets, the starting point for freeing space is an MCU boundary; all space after the last used MCU boundary is freed up to the high allocated RBA.

    Partial release does not release space on later volumes that can contain data either from a prior writing or due to guaranteed space. With a system-managed data set this has no effect on a later use of DISP=MOD but it does mean that the space on the later volumes can be there due to guaranteed space allocation.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014