Expanding a page set (COPYPAGE) on z/OS

Use the COPYPAGE function to copy one or more page sets to a larger page set.

Note: The COPYPAGE function is only used for expanding page sets. It is not used for making backup copies of page sets. To do this, use AMS REPRO as described in How to back up and recover page sets. When you have used the COPYPAGE function, the page sets cannot be used by a queue manager with a different name, so do not rename your queue manager.

Use the COPYPAGE function to copy one or more page sets to a larger page set. All queues and messages on the page set are copied. If you copy page set zero, all the IBM MQ object definitions are also copied. Each page set is copied to a destination data set that must be formatted as a page set. Copying to a smaller page set is not supported.

If we 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.

To use the COPYPAGE function, define DDnames in the range CSQS0000 through CSQS0099 for the source data sets, and define DDnames for the target data sets from CSQT0000 through CSQT0099.

For more information, see Manage page sets.


Page set management (COPYPAGE)

COPYPAGE


Keywords and parameters

There are no keywords or parameters.


Example

In Sample JCL showing the use of the COPYPAGE function, two existing page sets are copied onto two new page sets. The procedure for this is:
  1. Set up the required DDnames, where:

      CSQP0005, CSQP0006
      Identify the destination data sets. These DDnames are used by the FORMAT function.

      CSQS0005, CSQS0006
      Identify the source data sets containing the two page sets we want to copy.

      CSQT0005, CSQT0006
      Identify the destination data sets (page sets), but this time for the COPYPAGE function.

  2. Format the destination data sets, referenced by DDnames CSQP0005 and CSQP0006, as page sets using the FORMAT function.
  3. Copy the two existing page sets onto the new page sets using the COPYPAGE function.

Figure 1. Sample JCL showing the use of the COPYPAGE function
//JOBLIB  DD  DISP=SHR,DSN=ANTZ.MQ.&VER..&LVL..OUT.SCSQANLE
//        DD  DISP=SHR,DSN=ANTZ.MQ.&VER..&LVL..OUT.SCSQAUTH
//*
//S1    EXEC PGM=IDCAMS
//* Delete any prior attempt, then allocate a new larger page set
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  *
DELETE 'VICY.MQ38.PAGE01.NEW' CLUSTER
DEFINE CLUSTER (NAME('VICY.MQ38.PAGE01.NEW') +
MODEL('VICY.MQ38.PAGE01') +
DATACLAS(EXTENDED) +
LINEAR CYLINDERS(100,50))
//*
//MQMUTIL  EXEC PGM=CSQUTIL,PARM='',REGION=4M
//* CSQUTIL
//*  FORMAT acts on DDNAME like CSQPnnnn
//*  optional, FORMAT PAGES(nnn) to force allocation and format of
//*       secondary extents.
//*  COPYPAGE copies from source, CSQSnnnn
//*       to  target, CSQTnnnn
//SYSPRINT DD  SYSOUT=*
//CSQP0001 DD  DISP=SHR,DSN=VICY.MQ38.PAGE01.NEW
//CSQS0001 DD  DISP=SHR,DSN=VICY.MQ38.PAGE01
//CSQT0001 DD  DISP=SHR,DSN=VICY.MQ38.PAGE01.NEW
//SYSIN    DD  * 
  FORMAT 
  COPYPAGE
//*
//RENAME  EXEC PGM=IDCAMS
//* the cluster and data components must be renamed independently
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  *
ALTER   'VICY.MQ38.PAGE01' NEWNAME('VICY.MQ38.PAGE01.OLD')
ALTER   'VICY.MQ38.PAGE01.DATA' +
NEWNAME('VICY.MQ38.PAGE01.OLD.DATA')
ALTER   'VICY.MQ38.PAGE01.NEW' +
NEWNAME('VICY.MQ38.PAGE01')
ALTER   'VICY.MQ38.PAGE01.NEW.DATA') +
NEWNAME('VICY.MQ38.PAGE01.DATA')
/*


Usage notes

  1. We cannot use COPYPAGE on page sets of a queue manager that is running.
  2. Use COPYPAGE involves stopping the queue manager. This results in the loss of nonpersistent messages.
  3. Before we use COPYPAGE, the new data sets must be preformatted 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. We 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.
  7. If you attempt to use the COPYPAGE function after the queue manager has terminated abnormally, the page sets might not have been closed properly. If a page set has not been closed properly, you cannot successfully run the COPYPAGE function against it.

    To avoid this problem, run the AMS VERIFY command before using the COPYPAGE function. The AMS VERIFY command might produce error messages. However, it does close the page sets properly, so that the COPYPAGE function can complete successfully.

    For more information about the AMS VERIFY command, see the DFSMS/MVS™ Access Method Services for VSAM or the DFSMS/MVS Access Method Services for the Integrated Catalog Facility manual.

  8. See Defining a page set to be larger than 4 GB for information on using the EXTENDED attribute on the DATACLAS parameter.

Parent topic: IBM MQ utility program (CSQUTIL) on z/OS