Cross-Systems Sharing

VSE/VSAM allows the sharing of catalogs and files across z/VSE systems. To this end, the catalogs and files must reside on shared devices that have been defined to the supervisor at IPL.

Each shared devices must have a unique volume identifier across all systems, because all locks are done using the volume of the catalog and the CI number within the catalog. Thus, if two catalogs are defined on DASDs with a duplicate VOLID in two different z/VSE systems, a lock from one system may interfere with a lock on another system and cause a catalog corruption.

You do not specifically invoke cross-system sharing when opening catalogs and files, because:
  • Catalogs are automatically shared if they reside on shared devices.
  • Files are automatically shared if they are owned by a shared catalog.

To ensure data protection, the degree of file sharing that is to be allowed can be specified in the SHAREOPTIONS parameter of the IDCAMS commands: ALTER, DEFINE CLUSTER, and DEFINE ALTERNATEINDEX. The following explains various options and their results.

  • Specifying SHAREOPTIONS(4)
    This specification provides:
    • Input OPEN function for all the systems that participate in cross-system sharing, and
    • Output OPEN function only for the first system that requests it.
    If you ignore this behavior, VSE/VSAM issues an OPEN error message with the error code 168 (X'A8') when trying to open a file. The error code means that the file is already opened for output from a different processor, and that only one processor may write output to the file at a time. In this case the OPEN error message is accompanied by the explanatory message:
    FILE ALREADY OPEN IN ANOTHER PARTITION, RC X’rc_value’ TASK X’task_id’
    which shows the owning task ID as X'FFFF'. The actual task ID will appear here only if the file is opened in another partition of the same processor.
  • Specifying SHAREOPTIONS(4 4)
    This specification provides OPEN functions for input and output processing for all the systems that participate in cross-system sharing. It provides full read and write integrity for a file that is accessed from:
    • Different partitions of a particular CPU, or
    • Different CPUs.
    Note: With SHAREOPTIONS(4 4) specified, the lock file activity (with regard to z/VSE DASD sharing) increases. This may have an effect on performance.
  • Defining Shared User Catalogs
    You may wish to have a non-shared master catalog on every system, and shared user catalog(s) that connect to every master catalog as illustrated in the following diagram:
    a non-shared master catalog on every system, and shared user catalog(s) that connect to every master catalog

    To do this, define the user catalog under one master catalog, then IMPORT CONNECT the user catalog to another master catalog. The shared (user) catalog(s) must contain entries for all shared files.