Once a database has been defined to one 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.
z/OS
To copy the definition from one Datacom Data Dictionary (DD) to another, extract the definitions using the DDBTGLM utility program, then use DDUPDATE to add the definition and complete the process in the target Datadictionary.
//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
/*
// 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
/*
-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
//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
/*
// EXEC PROC=procname
// EXEC DDUPDATE,SIZE=960K
Input transactions as below
/*
-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
-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 -----------------------------------------------------------------
-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
//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
/*
// 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
/*
For more information about the DDBTGLM and DDUPDATE programs, please refer to the following documentation:
Version 15.1 ==> DDBTGLM - Generating Batch Transactions
Version 15.1 ==> DDUPDATE - Updating Datadictionary
For more information about the various database management utilities to initialize and load databases, please see:
Version 15.1 ==> DBUTLTY Reference
As always, please contact Broadcom support for Datacom if you have further questions.