Warning
This approach may not work with VSAM files that specify share options 2 or
4.The reason for the problem here is that, with SHROPTN(2), or SHROPTN(4), VSE/VSAM′s method of enqueuing the file (to protect it during a
write) uses the file ID of the VSAM catalog and the volume serial number of the volume.
Notes:
Share option 2 provides that the file may be opened by more than one request for input processing and, at the same time, by one request for output processing. This option ensures write integrity; however, the file might be modified while records are retrieved from it, so every user must ensure his or her own file′s read integrity.
Share option 4 provides that a
If, for any reason, the file were to be opened for output processing while the target is online to the VSE/ESA system, return code x′A8′
(168)might be returned indicating that the data set is in use. This is caused by the lock with duplicate volume serial numbers. The situation can be corrected by canceling and restarting the job after taking the target offline; there is no data integrity exposure.
C.1 Backing up VSAM Volumes
There are several instances where SnapShot can be used to back up VSAM volumes for use within the same LPAR or different LPARs. In a first example, we wanted to copy a VSAM volume that contained both the user catalog (UCAT) and all of the UCAT′s files on a single volume. In this case, we would make a snap copy of the volume with the target volume having a volume serial number different from that of the source. Before we actually issue the IXFP SNAP command, any files that are open have to be closed so that the data is written to the disk. Then a utility like VSE/FASTCOPY or the VM/ESA DDR could be used to back up the volume to tape. If all that we were trying to establish was a restart copy in case there was an application failure, the tape backup is superfluous. The VSAM volume cannot be used because the VSAM catalog ′ s contents include the volume serial number of the volume on which it was created. If VSAM finds a different volume serial number, it cannot process the catalog.
In a second example, the VSAM files reside on several volumes and have a unique UCAT for these files. Here, we would use the same procedure as above to quiesce activity against the files. The volumes containing the files would then be snap copied and, optionally, backed up to tape.
In a third example, we again have one or more VSAM volumes controlled by a single UCAT. This time, we would like to carry the data from our production