IMS repository data set states

The state of each IMS repository data set is maintained in the Repository Server (RS) catalog repository. This status is recognized at repository open time.

Each repository data set pair can be in one of the following states:
  • COPY1 (primary)
  • COPY2 (secondary)
  • SPARE (empty)
  • DISCARD (discarded)
  • NONE (not defined)

Because the two active copies are intended to be a duplex pair, the only difference between the COPY1 and COPY2 data set pairs is that COPY1 is the first to be updated during the two-phase update process.

When a repository is created, the RDS1 pair is designated as COPY1 and the RDS2 pair is designated as COPY2. If the RDS3 pair is defined, it is designated as SPARE. However, the status of a repository data set pair is not fixed over time, as shown in the following example activities:
  1. A repository is added but RDS3 is not defined:
    RDS1 Status . . . . : COPY1
    RDS2 Status . . . . : COPY2
    RDS3 Status . . . . : NONE
  2. The administrator uses the UPDATE command to define the RDS3 data sets, which are designated as SPARE:
    RDS1 Status . . . . : COPY1
    RDS2 Status . . . . : COPY2
    RDS3 Status . . . . : SPARE
  3. After a write failure occurs with RDS1, the RS discards the RDS1 data sets, and the RDS3 data sets become the new COPY1:
    RDS1 Status . . . . : DISCARD
    RDS2 Status . . . . : COPY2
    RDS3 Status . . . . : COPY1
  4. The administrator uses the DSCHANGE command to change the state of the RDS1 data sets to SPARE:
    RDS1 Status . . . . : SPARE
    RDS2 Status . . . . : COPY2
    RDS3 Status . . . . : COPY1

A repository data set pair that is identified by the RS as having lost integrity is discarded. If a COPY1 or COPY2 repository data set pair is discarded due to a write error, the repository is stopped at this time to enable recovery. In this event, the RS drives recovery automatically if a SPARE repository data set pair is available. If no SPARE repository data set is available, the repository is stopped, and administrator intervention is required to restart the repository.

Restriction: While a repository is stopped, an administrator can choose to discard a COPY1 or COPY2 repository data set pair. However, the last repository data set with COPY1 or COPY2 status cannot be discarded.
Requirement: Repository data sets intended to be marked SPARE must be empty. If the repository data set pair is not empty, this condition is identified when the repository data sets are opened, and the repository data set pair is discarded.

The data sets associated with a SPARE repository data set pair are allocated to the RS if the repository is open.

The data sets associated with a DISCARD repository data set pair are not allocated to the RS and can therefore be redefined by an administrator. When the data sets have been redefined, the repository data set pair can be changed dynamically (that is, while the user repository is open) from DISCARD to SPARE by issuing the DSCHANGE FRPBATCH command or ADMIN RS command. In this case, it is allocated and, if it passes validation, assigned the SPARE status.

Two data set pairs can be designated as SPARE temporarily during recovery. This situation can occur, for example, if there a problem occurs with the definition of one of the data sets that the RS is trying to recover to. The recovery process can reestablish the second valid copy when any data set problems are corrected.