CL Command Reference - ADDDTADFN
CL Command List > ADDDTADFN Reference
Description:
The Add Data Definition (ADDDTADFN) command copies file, record format, and field definitions from an externally described database file to a data dictionary.
When definitions are added to a dictionary, the system does a search to find out if the dictionary contains a definition with the same name as the one being added. If an exact match of the definition is found, the existing definition is used. If an exact match is not found, a new version of the definition is created.
Database files using the following functions are not added to a dictionary:
. Access path sharing
. Alternative collating sequence
. Program-described files
. Join logical files
. Logical files with more than one format
. Logical files with select/omit specifications
Only format and field definitions of database files using the following functions are added to a dictionary:
. Field default values
. Field validity check codes
. Key fields defined using names in based on physical files
. Derived fields
Note: When adding a file that is already linked, the current link is ended and then the definition is added and linked.
Examples:
ADDDTADFN FILE(MYLIB/MYFILE) DTADCT(MINE) DFN(*FILE)
This command copies the definitions from MYFILE located in library MYLIB to the dictionary MINE. The file definition has the same name as the database file specified in the FILE parameter.