Format DEFINE DATABASE database-name [ DESCRIPTION IS /*text*/ ] [ AUDIT IS /*text*/ ] USING rms-database-name ON file-name [ qualifier ] .
1 – Parameters
1.1 – database-name
Specifies the database element you are creating.
1.2 – text
Adds information. Within the DESCRIPTION clause, this is information documenting the database; within the AUDIT clause, it is a history list entry. Valid delimiters are /* */ or double quotation marks (" "). You can use Japanese to document comments in the DESCRIPTION or AUDIT clause for a field. To do this, use the SET CHARACTER_SET command, and set the character_set of the session to DEC_KANJI.
1.3 – rms-database-name
Specifies an existing logical RMS database element. It must be the name of an existing CDD$RMS_DATABASE element.
1.4 – file-name
Specifies the location on disk of the physical OpenVMS file that holds the physical RMS database. It is a character string having from 1 to 1024 characters.
2 – Qualifiers
2.1 /EXISTING_FILE
Specifies that an RMS file exists and does not need to be created.
3 – Description
The DEFINE DATABASE command creates a physical RMS database on disk using an RMS database element. If the command completes successfully, DEFINE DATABASE creates a CDD$DATABASE element (with the database name you specified) and a CDD$FILE element (with the OpenVMS file name you specified) in your directory. If the RMS database element is a controlled element, you use the DEFINE DATABASE command to create the initial version of a database. Use the RESERVE and REPLACE commands to create new versions. If the RMS database element is an uncontrolled element, you use the DEFINE DATABASE command to create both initial and new versions. If you supply a database name that is already used for a database element in your specified directory, you will create a new version of the existing database definition. This command allows you to create many different physical RMS databases using the same logical RMS database element. You can specify a different location on disk for each database with an OpenVMS file name. As of Oracle CDD/Repository Version 6.1, the DEFINE DATABASE command supports unsigned numeric and ADT fields as keys in RMS databases. If the database name does not specify a full path name, CDO creates the database definition in your current default directory. CDO attempts to translate the database name you supply to determine if it is a valid logical name. If it is a logical name and CDO cannot translate the logical name to a valid path name, the operation fails.
4 – Examples
1.CDO> DEFINE DATABASE DISG_FILE USING EMPLOYEE_STORAGE cont> ON DISK1:[DISG]EMP.DAT. In this example, the DEFINE DATABASE command creates the physical DISG_FILE RMS database in the OpenVMS EMP.DAT file on disk, using the logical EMPLOYEE_STORAGE RMS database element. 2.CDO> DEFINE DATABASE EMPLOYEES cont> AUDIT IS /* INFORMATION ON CURRENT "EMPLOYEES" */ cont> USING EMPLOYEE_DATABANK ON DISK2:[SMITH]MORE_EMP.DATA. In this example, the DEFINE DATABASE command creates the physical EMPLOYEES RMS database on disk in the OpenVMS MORE_EMP.DATA file, using the EMPLOYEE_DATABANK RMS database element.