DUPDBN DUPLICATE DATA BASE NETWORK TAADBHM
The Duplicate Data Base Network command duplicates one or more
physical files from one library to another as well as any dependent
logical files. The CRTDUPOBJ command is used internally (no source
members are read).
A typical command would be:
DUPDBN FILE(ABC DEF) FROMLIB(LIB1) TOLIB(LIB2)
The physical files ABC and DEF would be duplicated from library LIB1
to library LIB2. Any dependent logical files over ABC or DEF would
also be duplicated to library LIB2.
All dependent files must be in the same library as the physical file.
If a multi-format logical exists in the network, all physical files
must be named on the command.
An option exists to copy the physical file data. Another option
determines how the existence of the same file names in the To library
will be handled. By default an escape message is sent. You may
optionally delete the data base network in the To library.
An optional spooled file is created with the details of what was
You must have *USE and *OBJMGT authority to the files to be
A generic name or *ALL can be specified such as:
DUPDBN FILE(*ALL) FROMLIB(LIB1) TOLIB(LIB2)
DUPDBN is intended for the case where you are going to be making
changes to one or more existing existing physical files and need to
change the data base network and the using programs in a separate
The following are the normal steps for this process:
1. DUPDBN would be used to duplicate the physical files in the
data base file network to a work library.
2. The DDS would be changed.
3. A function like the TAA Tool RPLPF would be used to re-create
the data base network with the new definition.
4. CPYF, a program, or the TAA Tool CVTDBFFMT would normally be
used to reformat a sample of the production data to test with.
5. A list of the programs that use the data base network would be
determined. A tool such as the TAA Tool DSPWHRUSE could be
6. The programs (and any associated display or printer files
would be changed and re-created in the work library.
7. Final testing would occur.
To cutover to the new objects:
8. CPYF, a program, or the TAA Tool CVTDBFFMT would be used to
reformat all of the physical data to the work library.
9. The TAA Tool MOVLIBOBJ would be used to move the objects from
the work library to the production library. The
DLTEXIST(*YES) option would be used to delete any
The intended use of the work library would be to contain the
production objects. You may place the source files in the work
library, but you should copy the entire source file (all members) as
the MOVLIBOBJ command will replace the file.
If all of the physical and logical files have been created, the
DUPDBN command uses DSPFD to build a member list of the logical files
in the To library. The records are read to ensure that none of the
files are dependent on files in the FROMLIB. This would tend to
defeat the purpose of DUPDBN. If a dependency is found outside the
library, an indication is printed in the spooled file and the command
will complete abnormally.
Command parameters *CMD
FILE A list of physical files to be duplicated. The
special value *ALL or generic names may be used. Up
to 40 files may be specified.
FROMLIB The library where the physical files exist.
TOLIB The library where the data base files should be
DATA Whether the data in the physical file should be
copied to the new file in the To library. *NO is
the default and does not copy any data. *YES may be
specified to copy the data.
DELETE A *YES/*NO option that determines if the
corresponding 'To library' objects should be
deleted. *NO is the default to send an error
message if corresponding files exist. *YES may be
specified to delete the corresponding files.
DLTSPLF A *YES/*NO option that determines if the summary
spooled file output will be deleted. *NO is the
default meaning the spooled file is retained.
*YES may be specified to delete the spooled file.
If an error occurs, a *YES request is ignored and
the spooled file is retained.
** You must have *USE and *OBJMGT authority to the files to be
** All dependent files must be in the same library as the
** If a multi-format logical exists in the network, all physical
files must be named on the command.
** During the running of the command, the current library is
changed to be the To library to allow for the proper 'based
on' file to be determined. Because of this technique, the
From library cannot be a library on the system portion of the
The following TAA Tools must be on your system:
CHKGENERC Check generic
CHKOBJ2 Check object 2
EDTVAR Edit variable
EXTLST Extract list
SNDCOMPMSG Send completion message
SNDESCMSG Send escape message
SNDSTSMSG Send status message
None, the tool is ready to use.
Objects used by the tool
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
DUPDBN *CMD TAADBHM QATTCMD
TAADBHMC *PGM CLP TAADBHMC QATTCL
TAADBHMC2 *PGM CLP TAADBHMC2 QATTCL
TAADBHMC3 *PGM CLP TAADBHMC3 QATTCL
TAADBHMC4 *PGM CLP TAADBHMC4 QATTCL
TAADBHMC5 *PGM CLP TAADBHMC5 QATTCL
TAADBHMC is the CPP.
TAADBHMC2 is used at the end of the command to check dependencies in
the To library.
TAADBHMC3 is used to validate the physical files if *ALL or a generic
name is used.
TAADBHMC4 is used to process the physical files if *ALL or a generic
name is used.
TAADBHMC5 is used to delete any existing files in the 'To library'.
Added to TAA Productivity tools May 1, 1996