Example 2: Creating a target zone from a distribution zone

A common use of ZONERENAME involves creating a new target zone after having performed a system generation.

Let us Assume that you have a distribution zone named SYSDLIB in data set SMPE.CSI. The distribution libraries described by this zone have been used to perform a system generation, and now you want to create a target zone describing the content of your new operating system. You want to call your new target zone SYSPROD. You also want to change the default OPTIONS entry for the renamed zone to SYSOPTS. Further, you want to indicate that the renamed zone is related to the SYSDLIB zone; that is, SYSDLIB is the distribution zone controlling the distribution libraries for the target zone.

First, you make a copy of the SMP.CSI data set containing the distribution zone SYSDLIB (SMPE.CSI.) using the access method services REPRO command. Let us assume the name of the copied data set is PROD.CSI.

Before the ZONERENAME operation, the GLOBALZONE ZONEINDEX indicates that zone SYSDLIB is on data set SMPE.CSI. There is no GLOBALZONE ZONEINDEX for SYSPROD. You can now use the following ZONERENAME command to rename the copy of SYSDLIB in PROD.CSI to SYSPROD, change the zone type to TARGET, and modify the OPTIONS and RELATED subentries:
SET      BDY(GLOBAL)        /* Set to global.           */.
ZONERENAME(SYSDLIB)         /* Rename zone SYSDLIB      */
         TO(SYSPROD)        /* to new name SYSPROD in a */
         NEWDATASET(        /* copy of a CSI data set   */
                    PROD.CSI   /* named PROD.CSI.       */
                   )        /*                          */
         TOTYPE(TARGET)     /* Change to a target type. */
         OPTIONS(SYSOPTS)   /* Change default OPTIONS.  */
         RELATED(SYSDLIB)   /* Related to DLIB zone.    */.

After the ZONERENAME operation, the GLOBALZONE ZONEINDEX still indicates that zone SYSDLIB is on data set SMPE.CSI; it has not been removed. A new GLOBALZONE ZONEINDEX entry has been created indicating that zone SYSPROD is on data set PROD.CSI. If the zone definition for SYSPROD is listed, the user sees that the default OPTIONS value is SYSOPTS and that the target zone is related to distribution zone SYSDLIB.

Other than the zone definition, the contents of the renamed zone are unchanged. You must make changes to the DDDEF entries in SYSPROD as required.

After performing these steps, you have a new target zone containing information describing the various modules, macros, and source as they exist on the distribution libraries. The additional information required in the target zone is the description of how the various distribution library elements are combined and installed into the target zone libraries. This information is added to the target zone by using the JCLIN command, with stage 1 system generation output as input to SMP/E.

Also, if you are using the dynamic allocation facility in SMP/E, you may have to add or modify some of the DDDEF entries in the new target zone. For an example of priming the new target zone after a full system generation, see Examples.