How to copy a database definition from one CA Datacom Datadictionary to another

Document ID : KB000024043
Last Modified Date : 14/02/2018
Show Technical Document Details

Summary: 

Once a database has been defined to one CA Datacom/DB Multi-User Facility (called MUF), it likely needs to be defined to other MUFs (when using a development MUF and then implementing this to the production MUF, for example).

Instead of going through the process to define all the fields and attributes again, this process will explain how to copy the definitions from the Datadictionary in one MUF and apply them to the new MUF.

Instructions: 

To copy the definition from one CA Datacom Datadictionary (DD) to another, you will extract the definitions using the DDBTGLM utility program, then use DDUPDATE to add the definition and complete the process in the target Datadictionary.

Process description:

  1. Extract the existing database definitions using program DDBTGLM. The output should go to a sequential file or PDS member using DD statement AUXOUT (z/OS), or to a library member defined by AUXOUTD (VSE). This step can be run multiple times as needed to correct errors.
  2. Run program DDUPDATE to delete the existing version of the database (if desired), if it exists in the new environment.
  3. Run DDUPDATE to add the BTG transactions into Datadictionary from the file or member (z/OS) or the library member (VSE) created in Step 1. If there are any problems, start at Step 2 after correcting them.
  4. Run DDUPDATE to
    Copy the new database to PROD status
    Catalog the PROD status database to the CXX (Directory)
    Enable the database for use
    If there are any problems, start at Step 2 after correcting them.
  5. Allocate and initialize the needed files for the data and index areas, using the standard DBUTLTY process.

Step 1 sample JCL (you may need to customize this for your environment):

z/OS:

//EXTRBTG  EXEC PGM=DDBTGLM,REGION=2M
//STEPLIB  DD DISP=SHR,DSN=<<your CUSLIB>>
//         DD DISP=SHR,DSN=<<your CABDLOAD>>
//SYSPRINT DD SYSOUT=*
//SYSPUNCH DD SYSOUT=*
//AUXOUT   DD DISP=(,CATLG),DSN=<<your output filename>>,
//            SPACE=(CYL,(1,1)),UNIT=SYSDA
//SNAPER   DD SYSOUT=*
//SYSDUMP  DD SYSOUT=*
//SYSIN    DD *
   Input transactions as below
/*

  

VSE:

// EXEC PROC=procname
// ASSGN SYSnnn,device-type,VOL=volser,SHR
// DLBL auxout,'<<your output filename>>'
// EXTENT SYSnnn,volser,,,rel trk/blk,number trks/blks
// EXEC DDBTGLM,SIZE=960K
   Input transactions as below
/*

Step 1 control cards:

-USR user,password
-DEF PATH,STANDARD
-END
-BTG AUXOUT         <-- Z/OS format (remove this comment before execution)
-BTG AUXOUTD,SYSNUM=nnn,BLKSZE=nnnn  <-- VSE format  (remove this comment)
-BTG START,DATABASE,<<your database name>>(PROD),STANDARD
-END

Notes:

  1. ##The BTG AUXOUT command (z/OS) directs the output to DDname AUXOUT
  2. The BTG AUXOUTD,SYSNUM... command (VSE) directs the output to the file allocated to AUXOUT, using the SYSNUM and BLKSIZE specifications.
  3. The BTG START command identifies the name of the database and version to be used to create the AUXOUT transaction file.

 

Steps 2, 3, 4 sample JCL (you may need to customize this for your environment):

z/OS:

//DDUPDATE EXEC PGM=DDUPDATE,REGION=2M
//STEPLIB  DD DISP=SHR,DSN=<<your CUSLIB>>
//         DD DISP=SHR,DSN=<<your 
CABDLOAD>>
//SYSPRINT DD SYSOUT=*
//SYSPUNCH DD SYSOUT=*
//SNAPER   DD SYSOUT=*
//SYSDUMP  DD SYSOUT=*
//SYSIN    DD *
   Input transactions as below
/*

  

VSE:

// EXEC PROC=procname
// EXEC DDUPDATE,SIZE=960K
   Input transactions as below
/*

  

Step 2 control cards:

-COM -----------------------------------------------------------------
-COM Enter your Datadictionary user and password on the next line
-USR user,password
-COM -----------------------------------------------------------------
-COM In the following SET: RPOF = NO DETAIL REPORT, RPON = PRODUCE REPORT
-SET RPOF
-COM -----------------------------------------------------------------
-COM The following transactions delete the existing structure definition
-COM for the database listed on the -DEL transaction (all versions)
-DEL DATABASE,<<your database name>>
1000 OBSOLETE
-END

Step 3 control cards are in your file/library member from Step 1 concatenated following these commands:

-COM -----------------------------------------------------------------
-COM Enter your Datadictionary user and password on the next line
-USR user,password
-COM -----------------------------------------------------------------
-COM In the following SET: RPOF = NO DETAIL REPORT, RPON = PRODUCE REPORT
-SET RPOF
-COM -----------------------------------------------------------------

Step 4 control cards:

-COM -----------------------------------------------------------------
-COM Turn on detail reporting
-SET RPON
-COM -----------------------------------------------------------------
-COM Copy the database definition to PROD status
-CPY DATABASE,<<your database name>>(T001),PROD
-END
-COM -----------------------------------------------------------------
-COM Catalog the definition to the CXX (Directory)
-UPD DATABASE,<<your database name>>(PROD)
1000 CATALOG
-END
-COM -----------------------------------------------------------------
-COM Mark the structure as available for use
-UPD DATABASE,<<your database name>>(PROD)
1000 ENABLE
-END

  

Step 5 sample JCL (you may need to customize this for your environment):

z/OS:

//INIT0234 EXEC PGM=DBUTLTY,REGION=2M
//STEPLIB  DD DISP=SHR,DSN=<<your CUSLIB>>
//         DD DISP=SHR,DSN=<<your 
CABDLOAD>>
//CXX      DD DISP=SHR,DSN=<<your CXX file name>>
//IXX234   DD DISP=(,CATLG),DSN=<<your file name HLQ>>.IXX234,
//            SPACE=(CYL,(5,1)),UNIT=SYSDA
//ABC234   DD DISP=(,CATLG),DSN=<<your file name HLQ>>.ABC234,
//            SPACE=(CYL,(15,1)),UNIT=SYSDA
//SYSIN    DD *
  INIT AREA=IXX,DBID=234
  INIT AREA=ABC,DBID=234
  LOAD AREA=ABC,DBID=234,FORMAT=NONE,SORT=1
/*

  

VSE:

// EXEC PROC=procname
// ASSGN SYSnnn,device type,VOL=volser,SHR
// DLBL CXX,'<<your CXX file name>>',,DA
// EXTENT SYSnnn,volser
// DLBL IXX234,'<<your file name HLQ>>.IXX234',9999,DA
// EXTENT SYSnnn,volser,,,rel trk/blk,number trks/blks
// DLBL ABC234,'<<your file name HLQ>>.ABC234',9999,DA
// EXTENT SYSnnn,volser,,,rel trk/blk,number trks/blks
// EXEC DBUTLTY,SIZE=960K
INIT AREA=IXX,DBID=234
INIT AREA=ABC,DBID=234
LOAD AREA=ABC,DBID=234,FORMAT=NONE,SORT=1
/*

Additional Information:

For more information about the DDBTGLM and DDUPDATE programs, please refer to the following guides:

CA Datacom/DB Version 14.02 Datadictionary Batch Reference Guide, in the sections “DDBTGLM - Generating Batch Transactions” and “DDUPDATE - Updating Datadictionary

CA Datacom/DB Version 15.0 Datadictionary Batch Reference Guide, in the sections “DDBTGLM - Generating Batch Transactions” and “DDUPDATE - Updating Datadictionary

For more information about using the DBUTLTY program to initialize and load the database data and index areas, please refer to the following guides:

CA Datacom/DB Version 14.02 DBUTLTY Reference Guide

CA Datacom/DB Version 15.0 DBUTLTY Reference Guide

As always, please contact CA Technologies support for CA Datacom if you have further questions.

***