[z/OS]

Copying a page set and resetting the log (RESETPAGE) on z/OS®

The RESETPAGE function is like the COPYPAGE function except that it also resets the log information in the new page sets.

RESETPAGE lets you restart the queue manager from a known, valid set of page sets, even if the corresponding log data sets have been corrupted.

The source page sets for RESETPAGE must be in a consistent state. They must be either:
  • Page sets that have been through a successful queue manager shutdown using the IBM® MQ command STOP QMGR.
  • Copies of page sets that have been through a successful stop.
The RESETPAGE function must not be run against copies of page sets made using fuzzy backup (see Method 2: Fuzzy backup ), or against page sets that are from a queue manager that has terminated abnormally.
RESETPAGE either:
  • Copies page sets on all data sets referenced by DDnames CSQS0000 through CSQS0099 to new data sets referenced by DDnames CSQT0000 through CSQT0099. If you use this function, modify the page set definition in the started task procedure to reflect the change of the name of the data set on which the new page set resides.
  • Resets the log information in the page set referenced by DDnames CSQP0000 through CSQP0099.

For more information, see Managing page sets.

Using the RESETPAGE function

You can use the RESETPAGE function to update a set of consistent page sets so that they can be used with a set of new (clean) BSDS and log data sets to start the queue manager. You only have to use the RESETPAGE function if both copies of the log have been lost or damaged; you can restart from backup copies of page sets (and accept the resulting loss of data from the time the copies were made), or from your existing page sets.

In this situation, use the RESETPAGE function on all the page sets of the affected queue manager. You must also create new BSDS and log data sets.

Note: Do not use the RESETPAGE function on a subset of the page sets known to IBM MQ.
If you run the RESETPAGE function against any page sets, but do not provide clean BSDS and log data sets for the queue manager, IBM MQ attempts to recover the logs from RBA zero, and treats the page sets as empty. For example, the following messages are produced if you attempt to use the RESETPAGE function to generate page sets zero, 1, 2, and 3 without providing a clean set of BSDS and log data sets:

CSQI021I +CSQ1 CSQIECUR PAGE SET 0 IS EMPTY. MEDIA RECOVERY STARTED
CSQI021I +CSQ1 CSQIECUR PAGE SET 1 IS EMPTY. MEDIA RECOVERY STARTED
CSQI021I +CSQ1 CSQIECUR PAGE SET 2 IS EMPTY. MEDIA RECOVERY STARTED
CSQI021I +CSQ1 CSQIECUR PAGE SET 3 IS EMPTY. MEDIA RECOVERY STARTED

Page set management (RESETPAGE)

Read syntax diagramSkip visual syntax diagram RESETPAGE FORCE

Keywords and parameters

FORCE
Specifies that the page sets specified by DDnames CSQP0000 through CSQP00nn are to be reset in place.

If FORCE is not specified, the page sets specified by DDnames CSQS0000 through CSQS00nn are copied to new page sets specified by DDnames CSQT0000 through CSQT00nn. This is the default.

You should take a copy of the page sets first. See backing up page sets for sample JCL to perform this operation.

Example

An existing page set, referenced by DDname CSQS0007, is copied to a new data set referenced by DDname CSQT0007. The new data set, which is also referenced by DDname CSQP0007, is already formatted as a page set before the RESETPAGE function is called.
Figure 1. Sample JCL showing the use of the RESETPAGE function

//RESTPAGE EXEC PGM=CSQUTIL
//STEPLIB  DD   DISP=SHR,DSN=thlqual.SCSQANLE
//         DD   DISP=SHR,DSN=thlqual.SCSQAUTH
//CSQP0007 DD   DISP=OLD,DSN=pageset.newname7
//CSQS0007 DD   DISP=OLD,DSN=pageset.oldname7
//CSQT0007 DD   DISP=OLD,DSN=pageset.newname7
//SYSPRINT DD   SYSOUT=*
//SYSIN    DD   *
* Format new data set, CSQP0007, as page set
 FORMAT
* Copy page set CSQS0007 to CSQT0007 and reset it
 RESETPAGE
/*

Usage notes

  1. Do not use the RESETPAGE function against page sets after the queue manager has terminated abnormally. Page sets from a queue manager that terminated abnormally will probably contain inconsistent data; using RESETPAGE on page sets in this state leads to data integrity problems.
  2. You cannot use RESETPAGE on page sets belonging to a queue manager that is running.
  3. Before you use RESETPAGE, the new data sets must be pre-formatted as page sets. To do this, use the FORMAT function, as shown in Figure 1.
  4. Ensure that the new (destination) data sets are larger than the old (source) data sets.
  5. You cannot change the page set identifier (PSID) associated with a page set. For example, you cannot 'make' page set 03 become page set 05.
  6. Failure of this function does not prevent other CSQUTIL functions from being attempted.