Previous Topic: AutoScope FeaturesNext Topic: Debugging Using an Additional SYSIN with the DBUTLTY SET Function


CXXCLONE

The CXXCLONE function was created to help you clone an environment to a new environment that is modeled after an existing environment. For example, if you had an environment named TEST5, and you had a reason for needing another environment you decided to name TEST6, one step in the creation of the new environment would be to build a TEST6 CXX. In this case, using a LOAD AREA=CXX from a backup of the TEST5 CXX would leave every area in a loaded status and with the data set names from the TEST5 environment. The new TEST6 environment, however, needs its own data sets for every index and data area. Leaving all the areas in loaded status, and with the TEST5 data set names, risks that they might not get corrected and can be used by both the TEST5 environment and the TEST6 environment, leading to large numbers of error conditions.

The DBUTLTY CXXCLONE function is similar to the LOAD AREA=CXX function of DBUTLTY in that it accepts a backup of a Directory (CXX) as an input data set and loads that data to an output CXX. But CXXCLONE is different from using the LOAD function in that it offers you potentially useful options that you can use to make changes during the load. Such as when you are not just restoring a backup of a CXX to the same CXX. If your goal is to make the CXX larger by doing a backup, then an INIT and a LOAD, using LOAD AREA=CXX is the tool we recommend that you use.

Using CXXCLONE to do CXX cloning avoids the problems described because one strategy of using CXXCLONE is to set all the loaded tables to a status of not loaded and to do a deletion of all data set names. Using that capability, you can plan to create new data sets for the entire TEST6 environment during the initialize and load process. This is a safe approach, because the data for the loads can come from data backups of TEST5 data areas or elsewhere, such as the installation "clean" databases for system areas such as CA Datacom Datadictionary, usually databases 2 and 15.

Another general CXX cloning strategy is to copy all of the database data sets after building the new CXX. With this strategy, the data sets can be left loaded, but the data set names need to be altered from TEST5 to TEST6, or they should be deleted and the new names established using the DBUTLTY function CXXMAINT with OPTION=ALTER and DSN=. Also with this strategy, the data sets need to be updated to be "linked" to the new CXX named TEST6, and this is done with the DBUTLTY function LINK.

Another difference between CXXCLONE and LOAD AREA=CXX is that, with the LOAD, if the database being loaded does not exist, the tables are set as not loaded and, if it exists, the status is left unchanged (usually loaded). But by using the STATUS= keyword of CXXCLONE, you can choose how you want the loaded status handled.

CXXCLONE and LOAD AREA=CXX are also different in that the LOAD function requires as input a backup of the same release as itself, while CXXCLONE allows input of a CXX of the same release or a CXX of the prior release. CXXCLONE therefore supports a function similar to the DBUTLTY function CXXMAINT OPTION=CONVERT1214 but with the additional options detailed in the following syntax diagrams and descriptions.

The CXXCLONE function, depending on the options specified, can restore one database, a range of databases, or a list with any combination of databases and ranges. Alternately, if no database ID is specified, every database of input is added to the current CXX.

Note: In addition to the following information about the CXXCLONE function, also see the information about CXXCLONE in the section on the SIMPLIFY feature in Common Actions Performed.

Using CXXCLONE in the SIMPLIFY Mode

When using SIMPLIFY mode when no DBID is specified, the function is required to execute with the MUF not enabled. It requires that the CXX has just been initialized with the INIT function.

When at least one DBID is specified, the function expects to execute using the MUF, and all access to the CXX is controlled by and done by the MUF. However, the function might execute with the MUF not enabled and by using a local CXX, if the CXX is protected by either having this function follow a previous function that must run with MUF not enabled (such as INIT AREA=CXX), or having the MUF declared down using a function SET OPTION1=MUF_NOT_ENABLED. It is also possible to follow a function SET OPTION=MUF_ENABLED_OR_DISABLED that indicates the function should run with MUF if enabled or without MUF using a CXX locally.

Using CXXCLONE when not in the SIMPLIFY Mode

When not in the SIMPLIFY mode, CXXCLONE executes similarly to the LOAD function with AREA=CXX, in that it executes without the MUF using the CXX locally, if no DBID is specified, and with MUF and not any CXX locally, if a DBID is specified.

For more information, see the CA Datacom/DB DBUTLTY Reference Guide for z/OS.