1 – COLLECTION
Format CHANGE COLLECTION collection-name [ DESCRIPTION IS /*text*/ ] [ NODESCRIPTION ] [ AUDIT IS /*text*/ ] . [ ]
1.1 – Parameters
1.1.1 – collection-name
Specifies the collection you are modifying.
1.1.2 – text
Modifies information. Within the DESCRIPTION clause, this is information documenting the collection; 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.2 – Description
The CHANGE COLLECTION command modifies a collection by performing a change in place. CDO changes the values you specify, and other values remain the same. Before you can issue the CHANGE COLLECTION command, you must issue the RESERVE COLLECTION command to reserve the collection. The SHOW COLLECTION or SHOW RESERVATIONS command indicates whether a condition is reserved. The RESERVE command creates a new version of the element. Since a collection is a controlled element, CDO freezes previous versions and allows you to modify only the highest visible version.
1.3 – Examples
1.CDO> SET CONTEXT CDO> DEFINE COLLECTION REGIONAL_SALES cont> DESCRIPTION IS "COLLECTION IS REGION_5". CDO> RESERVE COLLECTION REGIONAL_SALES CDO> CHANGE COLLECTION REGIONAL_SALES cont> DESCRIPTION IS "COLLECTION DIRECTORY IS WEST_COAST". CDO> REPLACE COLLECTION REGIONAL_SALES In this example, the CHANGE COLLECTION command modifies the description clause of the REGIONAL_SALES collection. 2.CDO> RESERVE COLLECTION COMPILER_C CDO> CHANGE COLLECTION COMPILER_C cont> NODESCRIPTION cont> AUDIT IS "PHASE REVIEW". CDO> REPLACE COLLECTION COMPILER_C In this example, the CHANGE COLLECTION command removes the description clause and adds audit text.
2 – CONTEXT
Format CHANGE CONTEXT context-name [ DESCRIPTION IS /*text*/ ] [ NODESCRIPTION ] [ AUDIT IS /*text*/ ] [ ] [ TOP IS collection-name ] [ NOTOP ] [ ] [ {SPECIFIC_VERSION } ] [ DEFAULT_ATTACHMENT IS {LATEST_CHECKIN } ] . [ {LATEST } ] [ { } ]
2.1 – Parameters
2.1.1 – context-name
Specifies the context you are modifying.
2.1.2 – text
Modifies information. Within the DESCRIPTION clause, this is information documenting the context; 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.
2.1.3 – collection-name
Specifies a new collection as the top collection for the context.
2.2 – Description
The CHANGE CONTEXT command modifies a context by performing a change in place. CDO changes the values you specify, and other values remain the same. Because a context is a nonversioned element, CDO does not accept a branch designation or a version number in the context name. The TOP clause redefines the top collection property for the context. An error occurs if you attempt to redefine the top collection while you have any element reserved to your context. The SHOW CONTEXT or SHOW RESERVATIONS command indicates whether this condition exists. The NOTOP keyword sets the top collection property to a null value. The DEFAULT_ATTACHMENT clause redefines the default attachment property for the context. This property refers to the default behavior that occurs when you issue the UPDATE command. Choose one of the following keywords: DEFAULT_ ATTACHMENT Keyword Behavior SPECIFIC_ Does not detach the currently attached version. VERSION LATEST_CHECKIN Detaches the currently attached version and attaches the most recently checked in version. LATEST Detaches the currently attached version and attaches the lastest version, whether it is checked in or is a ghost. The LATEST keyword is the default.
2.3 – Examples
CDO> CHANGE CONTEXT DEVELOPMENT_CONTEXT cont> DESCRIPTION IS "ARCHIVING THIS CONTEXT" cont> "VERSION 5.0 DEVELOPMENT COMPLETED" cont> NOTOP cont> DEFAULT_ATTACHMENT IS SPECIFIC_VERSION. In this example, the CHANGE CONTEXT command modifies the DEFAULT_ATTACHMENT clause, the description text, and the TOP clause in the DEVELOPMENT_CONTEXT context.
3 – DATABASE
Format CHANGE DATABASE rms-database-name [ DESCRIPTION IS /*text*/ ] [ NODESCRIPTION ] [ AUDIT IS /*text*/ ] [ ] [ ON file-name ] .
3.1 – Parameters
3.1.1 – rms-database-name
Specifies the physical RMS database you are modifying.
3.1.2 – text
Modifies 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.
3.1.3 – file-name
Specifies a new disk location for the physical RMS database. This OpenVMS file name is a character string having from 1 to 1024 characters.
3.2 – Description
The CHANGE DATABASE command modifies a physical RMS database element by performing a change in place. CDO changes the values you specify, and other values remain the same. If an RMS database element is controlled, CDO freezes previous versions and allows you to modify only the highest visible version. If an RMS database is uncontrolled, CDO modifies the highest version unless you specify another version number. If an RMS database element is controlled, you must reserve the database before you can issue the CHANGE DATABASE command. The SHOW DATABASE or SHOW RESERVATIONS command indicates whether this condition exists. The ON clause moves a physical RMS database to a new location on disk. When you specify the ON clause, CDO issues a notice asking you to confirm that you want to move the database. This notice cannot be suppressed. If the CHANGE DATABASE command succeeds, Oracle CDD/Repository moves the physical file on disk and updates the pointer to the physical file in the repository. If the CHANGE DATABASE command fails, Oracle CDD/Repository does not move the database.
3.3 – Examples
1.CDO> CHANGE DATABASE DISG_FILE cont> DESCRIPTION "INFORMATION ON DIS SECTION EMPLOYEES" cont> "PERSONNEL CONTACT IS JIM SMITH" cont> AUDIT "JIM SMITH ACCEPTS THIS ACCOUNT 06/30/90". In this example, the CHANGE DATABASE command modifies the description clause and adds an AUDIT clause to the DISG_FILE database. 2.CDO> CHANGE DATABASE DISG_FILE cont> ON DISK1:[SMITH.PERSONNEL]EMP.DAT. In this example, the CHANGE DATABASE command moves the DISG_ FILE database to a new location.
4 – FIELD
Format CHANGE FIELD field-name [ DESCRIPTION IS /*text*/ ] [ NODESCRIPTION ] [ AUDIT IS /*text*/ ] [ ] [ field-property ] [ NOfield-property ] ... . [ ]
4.1 – Parameters
4.1.1 – field-name
Specifies the field element you are modifying.
4.1.2 – text
Modifies information. Within the DESCRIPTION clause, this is information documenting the field; 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.
4.1.3 – field-property
Changes the value of an existing property, or adds a new property, in the field element. You specify removal with the NO keyword. See fld-properties for the field properties CDO provides.
4.2 – Description
The CHANGE FIELD command modifies a field element by performing a change in place. CDO changes the values you specify, and other values remain the same. If a field element is controlled, CDO freezes previous versions and allows you to modify only the highest visible version. If a field element is uncontrolled, CDO modifies the highest version unless you specify another version number. If a field element is controlled, you must reserve the field before you can issue the CHANGE FIELD command. The SHOW FIELD or SHOW RESERVATIONS command indicates whether this condition exists. When you change a field element that an Oracle Rdb database uses, you may need to integrate the database with the repository. CDO automatically sends a notice with the name of the database when this is necessary.
4.3 – Examples
1.CDO> CHANGE FIELD POSTAL_CODE cont> DESCRIPTION "A 5 DIGIT POSTAL_CODE: NOTE AUDIT" cont> AUDIT "CHANGED TO 9 DIGIT POSTAL_CODE 6/30/90". In this example, the CHANGE FIELD command modifies the description clause and adds an audit clause to the POSTAL_ CODE field element. 2.CDO> CHANGE FIELD TOTAL cont> NOINITIAL_VALUE. In this example, the CHANGE FIELD command removes the INITIAL_ VALUE field property with the NO keyword.
5 – FILE_ELEMENT
Format CHANGE FILE_ELEMENT type-name element-name [ DESCRIPTION IS /*text*/ ] [ NODESCRIPTION ] [ AUDIT IS /*text*/ ] [ ] [ {n } ] [ property-name IS {quoted-string } ] ... . [ { } ] [ NOproperty-name ] END [ FILE_ELEMENT element-name ] [ type-name ] .
5.1 – Parameters
5.1.1 – type-name
Specifies the type (MCS_BINARY or an MCS_BINARY subtype) of the file element you are modifying. See the Oracle CDD/Repository Information Model for more information on these types.
5.1.2 – element-name
Specifies the file element you are modifying.
5.1.3 – text
Modifies information. Within the DESCRIPTION clause, this is information documenting the file element; 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.
5.1.4 – property-name
Specifies the property you are adding, changing, or removing. You specify removal with the NO keyword.
5.1.5 – n
Modifies the value (numerical) set for a property.
5.1.6 – quoted-string
Modifies the value (a string enclosed in quotation marks) set for a property.
5.2 – Description
The CHANGE FILE_ELEMENT command modifies a file element by performing a change in place. CDO changes the values you specify, and other values remain the same. Because a file element is a controlled element, CDO freezes previous versions and allows you to modify only the highest visible version. Before you can issue the CHANGE FILE_ELEMENT command, you must reserve the file element with the RESERVE FILE_ELEMENT command. If you add, change, or delete a property from the file element, the property you specify must be a defined or inherited property for the file element's type. See the Oracle CDD/Repository Information Model for a list of these properties. Errors occur if you attempt to delete the MCS_STOREDIN property from a file element whose STORETYPE is EXTERNAL. CDO requires this property for external files.
5.3 – Examples
CDO> RESERVE FILE_ELEMENT MCS_BINARY PARSER_TABLES CDO> CHANGE FILE_ELEMENT MCS_BINARY PARSER_TABLES cont> DESCRIPTION IS "PARSER TABLES FOR VERSION 5.0". cont> END MCS_BINARY. CDO> REPLACE FILE_ELEMENT MCS_BINARY PARSER_TABLES In this example, the CHANGE FILE_ELEMENT command adds description text to the file element PARSER_TABLES.
6 – GENERIC
Format CHANGE GENERIC type-name element-name [ DESCRIPTION IS /*text*/ ] [ NODESCRIPTION ] [ AUDIT IS /*text*/ ] [ ] [ {n } ] [ property-name IS {quoted-string } ] ... . [ { } ] [ NOproperty-name ] [ DEFINE relationship-name relationship-mbr [ {n } ] [ property-name IS {quoted-string } ] ... . [ { } ] [ NOproperty-name ] END relationship-name DEFINE . ] ... [ DELETE relationship-name relationship-mbr . ] ... END [ element-name ] type-name .
6.1 – Parameters
6.1.1 – type-name
Specifies the type of the generic element you are modifying. This type cannot be MCS_BINARY, a subtype of MCS_BINARY, MCS_ COLLECTION, MCS_CONTEXT, or MCS_PARTITION. See the Oracle CDD/Repository Information Model Volume I for more information.
6.1.2 – element-name
Specifies the generic element you are modifying.
6.1.3 – text
Modifies information. Within the DESCRIPTION clause, this is information documenting the generic element; 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.
6.1.4 – property-name
Specifies the property you are adding, changing, or removing. You specify removal with the NO keyword.
6.1.5 – n
Modifies the value (numerical) set for a property.
6.1.6 – quoted-string
Modifies the value (a string enclosed in quotation marks) set for a property.
6.1.7 – relationship-name
Specifies the relationship type that you are defining or deleting in the generic element. The type must be a subtype of RELATION.
6.1.8 – relationship-mbr
Specifies the generic element that you are defining or deleting as a member of the relationship type. The element must exist in the repository; otherwise, an error occurs.
6.2 – Description
The CHANGE GENERIC command modifies a generic element by performing a change in place. CDO changes the values you specify, and other values remain the same. If a generic element is a controlled versioned element, CDO freezes previous versions and allows you to modify only the highest visible version. If a generic element is an uncontrolled versioned element, CDO modifies the highest version unless you specify another version number. If a generic element is controlled, you must reserve the element before you can issue the CHANGE GENERIC command. The SHOW GENERIC or SHOW RESERVATIONS command indicates whether this condition exists. You can modify generic elements that are based on types supplied through Oracle CDD/Repository or on user-supplied (extended) types. If you do most of your work with extended types, Oracle recommends that you should work through the Oracle CDD/Repository callable interface. The CDO GENERIC commands are useful to modify and display on a spot basis, but extensibility is not supported through CDO. If you add, change, or delete a property from the generic element, the property you specify must be a defined or inherited property for the element's type. Likewise, any relationship member you specify must be compatible with the relationship name's type. See the Oracle CDD/Repository Information Model Volume I for more information on valid properties and types. If the generic element you are modifying is based on an extended type and errors occur when you attempt to add or delete a relationship, you may not have specified the processing name property as a required property for your type. The property takes a quoted string value. CAUTION Specify the MCS_processingName property, not the CDD$PROCESSING_NAME property, when you work with extended types. Otherwise, you experience performance degradation in the Oracle CDD/Repository callable interface. The type on which the generic element definition is based determines whether an attribute is required or optional in instances of the type. If the type definition specifies that the CDD$DESCRIPTION attribute can be used in instances of the type, you can add documentation text to the generic entity definition or remove existing documentation text. You can display text entered with the DESCRIPTION clause by using the SHOW GENERIC command with the /BRIEF or /FULL qualifiers. If the type definition specifies that the CDD$HISTORY_LIST relationship can be used in instances of the type, you can add explanatory history list entries to the generic entity definition. You can display history list entries for generic entity definitions by using the SHOW GENERIC command with the /AUDIT or /ALL qualifiers.
6.3 – Examples
1.CDO> CHANGE GENERIC CDD$EXECUTABLE_IMAGE MY_PROGRAM cont> MCS_PROCESSINGNAME "OUR_PROGRAM". cont> END MY_PROGRAM CDD$EXECUTABLE_IMAGE. In this example, the CHANGE GENERIC command modifies the MCS$PROCESSING_NAME (MCS_processingName property) of the generic element MY_PROGRAM. MY_PROGRAM is based on the type CDD$EXECUTABLE_IMAGE, which is supplied by Oracle CDD/Repository. 2.CDO> CHANGE GENERIC BOOK CDO_REFERENCE_MANUAL cont> LIBRARY_NUMBER IS "AA-KL45A-TF". cont> END BOOK CDO_REFERENCE_MANUAL. In this example, the CHANGE GENERIC command modifies the LIBRARY_NUMBER of the CDO_REFERENCE_MANUAL generic element. CDO_REFERENCE_MANUAL is based on the user-supplied type BOOK.
7 – PARTITION
Format CHANGE PARTITION partition-name [ DESCRIPTION IS /*text*/ ] [ NODESCRIPTION ] [ AUDIT IS /*text*/ ] [ ] [ LOOKASIDE_PARTITION IS look-partition-name ,... ] [ NOLOOKASIDE_PARTITION ] [ ] [ PARENT_PARTITION IS parent-partition-name ] [ AUTOPURGE ] [ NOAUTOPURGE ] . [ ]
7.1 – Parameters
7.1.1 – partition-name
Specifies the partition you are modifying.
7.1.2 – text
Modifies information. Within the DESCRIPTION clause, this is information documenting the partition; 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.
7.1.3 – look-partition-name
Modifies the list of partitions that is visible through this partition. Each partition must be an existing partition.
7.1.4 – parent-partition-name
Modifies the partition hierarchy by naming a parent (owner) for an existing parent (owner) partition.
7.2 – Description
The CHANGE PARTITION command modifies a partition by performing a change in place. CDO changes the values you specify, and other values remain the same. Because a partition is a nonversioned element, CDO does not accept a branch designation or a version number in the partition name. The LOOKASIDE_PARTITION clause modifies the list of partitions whose contents are visible through the partition you are modifying. The PARENT_PARTITION clause modifies the partition hierarchy by naming an owner for an existing parent (owner) partition. This clause can be specified only once during the lifetime of the partition, in either the DEFINE PARTITION or CHANGE PARTITION command. The AUTOPURGE and NOAUTOPURGE keywords redefine the autopurge property for the partition. The value of this property indicates whether or not CDO automatically purges intermediate versions of elements in the partition when you promote the latest version.
7.3 – Examples
1.CDO> DEFINE PARTITION FIRST_BASELEVEL AUTOPURGE. CDO> DEFINE PARTITION FRONT_END cont> PARENT_PARTITION IS FIRST_BASELEVEL AUTOPURGE. CDO> DEFINE PARTITION BACK_END cont> PARENT_PARTITION IS FIRST_BASELEVEL cont> LOOKASIDE_PARTITION IS FRONT_END AUTOPURGE. CDO> CHANGE PARTITION FRONT_END cont> LOOKASIDE_PARTITION IS BACK_END. In this example, the CHANGE PARTITION command adds a LOOKASIDE_ PARTITION clause to the FRONT_END partition element. You add this clause in a CHANGE PARTITION command, rather than in the initial DEFINE PARTITION command, because the partition named in a LOOKASIDE_PARTITION clause must be an existing partition. 2.CDO> DEFINE PARTITION FINAL_REPORT AUTOPURGE. CDO> DEFINE PARTITION PUBLICATION_RELEASE AUTOPURGE. CDO> CHANGE PARTITION FINAL_REPORT cont> PARENT_PARTITION IS PUBLICATION_RELEASE. In this example, the CHANGE PARTITION command adds a PARENT_ PARTITION clause to the FINAL_REPORT partition element. 3.CDO> DEFINE PARTITION FIRST_TESTBASELEVEL AUTOPURGE. CDO> CHANGE PARTITION FIRST_TESTBASELEVEL cont> AUDIT IS "LET'S PROMOTE ALL TEST VERSIONS" NOAUTOPURGE. In this example, the CHANGE PARTITION command adds an AUDIT clause and modifies the AUTOPURGE keyword.
8 – PROTECTION
Format { DIRECTORY } { FIELD } CHANGE PROTECTION FOR { RECORD } element-name ,... { } { GENERIC type-name } [ POSITION n ] [ id1+... ] ACCESS right+ ... . [ ] { REPOSITORY anchor-name } CHANGE PROTECTION FOR { GENERIC MCS_CONTEXT context-name } { } [ POSITION n ] { ACCESS } { DEFAULT_ACCESS } right+ ... . { }
8.1 – Parameters
8.1.1 – type-name
Specifies the type of the generic element whose ACE you are modifying.
8.1.2 – element-name
Specifies the element whose ACE you are modifying. You can use wildcard characters in this name.
8.1.3 – n
Specifies the relative position (a positive integer) in the ACL of the ACE you are modifying. If you omit this parameter and also the id1 parameter, CDO changes the first ACE by default.
8.1.4 – id
Specifies the identifier of the ACE you are modifying. If you omit this parameter and also the n parameter, CDO changes the first ACE by default.
8.1.5 – right
Specifies the access rights you are granting to the users specified in the ACE.
8.1.6 – anchor-name
Specifies the anchor directory for the repository whose ACE you are modifying.
8.1.7 – context-name
Specifies the context for which you are modifying protections.
8.2 – Description
The CHANGE PROTECTION command modifies access rights for an access control list entry (ACE) in an access control list (ACL) for an element. When you specify FOR GENERIC MCS_CONTEXT or FOR REPOSITORY, this command can also add an ACE to a default access control list. CHANGE PROTECTION affects a change in place. CDO changes the values you specify, and other values remain the same. You must have CONTROL access rights to change protection for an element or a repository. The POSITION clause identifies the ACE you are changing by its relative position within the ACL. For example, POSITION 3 indicates the third ACE in the ACL. If you specify a number greater than the number of existing ACEs, CDO changes the last ACE in the ACL. The id parameter specifies the user or users affected by the ACE you are changing. The clause consists of one or more UIC, general, or system-specified identifiers. If you specify more than one identifier, a user's process must hold all the identifiers before CDO grants the access rights indicated in the ACE. The ACCESS clause specifies access rights provided by the ACE. See the DEFINE PROTECTION command for more information on access rights. The ACCESS clause is especially useful when you need to restrict access to a context or to a repository. For example, by modifying this clause you can restrict access to a single user for OpenVMS BACKUP or VERIFY operations. The DEFAULT_ACCESS clause is only valid for contexts (specified as GENERIC MCS_CONTEXT) or repositories. The clause specifies the default access rights for each new element you create. If a context is set, the new element receives default access rights defined for this context. If a context is not set, the new element receives the default access rights defined for the repository.
8.3 – Examples
1.CDO> CHANGE PROTECTION FOR RECORD cont> PAYROLL, PROMOTION [JONES]+INTERACTIVE cont> ACCESS CONTROL+READ. In this example, the CHANGE PROTECTION command affects the access rights for the PAYROLL and PROMOTION record elements. CDO locates the ACE containing [JONES]+INTERACTIVE identifiers and adds additional CONTROL and READ access rights. 2.CDO> CHANGE PROTECTION FOR FIELD cont> EMP_DATE POSITION 3 ACCESS NOALL+READ. In this example, the CHANGE PROTECTION command affects the access rights for the EMP_DATE field element. CDO locates the third ACE in the field's ACL and removes all access rights except READ access. 3.CDO> CHANGE PROTECTION FOR RECORD SALARY ACCESS NONE. In this example, the CHANGE PROTECTION command changes the first ACE in the ACL for the SALARY record element. After the command executes, the users whose identifiers match the identifiers in the first ACE will not have access to the SALARY record element. 4.CDO> CHANGE PROTECTION FOR REPOSITORY PERSONNEL cont> POSITION 3 DEFAULT_ACCESS READ+NOWRITE+CONTROL. CDO> DEFINE FIELD NEW_FIELD DATATYPE TEXT SIZE 5. In this example, the CHANGE PROTECTION command changes the default access rights for the PERSONNEL repository to READ+NOWRITE+CONTROL. If a context has not been set, CDO will then grant the newly created field, NEW_FIELD, with access rights that are equivalent to these repository default access rights.
9 – RECORD Command
Format CHANGE RECORD record-name [ DESCRIPTION IS /*text*/ ] [ NODESCRIPTION ] [AUDIT IS /*text*/] [ ] [ constraint-clause ] [ DELETE CONSTRAINT constr-name ] [ record-property ] ... . [ ] [ NOrecord-property ] [ DELETE name . ] ... [ included-name-change-clause ] [ local-field-clause ] [ record-change-clause ] ... [ structure-change-clause ] [ ] [ variants-change-clause ] END [ record-name ] RECORD .
9.1 – Parameters
9.1.1 – record-name
Specifies the record element you are modifying.
9.1.2 – text
Modifies information. Within the DESCRIPTION clause, this is information documenting the record; 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.
9.1.3 – constraint-clause
Adds a condition, known as a constraint, that affects adding or modifying data in a database table (record). Supported constraint types are NOT NULL, PRIMARY KEY, FOREIGN KEY, UNIQUE, and CHECK. Each constraint can be named and supplied with evaluation attributes DEFERRABLE or NOT DEFERRABLE. The default evaluation time for constraints in CDO is NOT DEFERRABLE (the constraint is evaluated at statement time). For more information, see the DEFINE RECORD_Constraint command.
9.1.4 – constr-name
Specifies the name of a constraint.
9.1.5 – record-property
Changes the value of an existing property or adds a new property in record, structure, variants, and variant definitions within a record element. You specify removal with the NO keyword. See rec-properties for the record properties CDO provides.
9.1.6 – name
Specifies the name of a record, structure, or field that you want to delete from the record.
9.1.7 – included-name-change-clause
Allows you to change existing field and record definitions within record elements. For more information, see the CHANGE RECORD_Included_Name_Change command.
9.1.8 – local-field-clause
Specifies the definition of the locally defined field. For more information, see the DEFINE RECORD_Local_Field command.
9.1.9 – record-change-clause
Adds field, record, structure, variants, and variant definitions within an existing record definition. For more information, see the CHANGE RECORD_Record_Change command.
9.1.10 – structure-change-clause
Allows you to change a structure definition within a record element. For more information, see the CHANGE RECORD_Structure_Change command.
9.1.11 – variants-change-clause
Allows you to change a variant definition, which is a set of two or more definitions that map to the same portion of a record element. For more information, see the CHANGE RECORD_Variants_Change command.
9.2 – Description
The CHANGE RECORD command modifies a record element by performing a change in place. CDO changes the values you specify, and other values remain the same. If a record element is controlled, CDO freezes previous versions and allows you to modify only the highest visible version. If a record element is uncontrolled, CDO modifies the highest version unless you specify another version number. If a record element is controlled, you must reserve the record element before you can issue the CHANGE RECORD command. The SHOW RECORD or SHOW RESERVATIONS command indicates whether this condition exists. When you change a record element that an Oracle Rdb database uses, you may need to integrate the database with the repository. CDO automatically sends a notice with the name of the database when this possibility occurs. To remove a field, record, or structure definition from a record element, if the definition is not contained within a variant or structure definition, specify the DELETE keyword, followed by the appropriate name or clause for the type of definition you are removing. To remove a definition from within a variant definition, use the NOVARIANTS and VARIANT keyword, followed by the DELETE clause. To remove a definition from within a structure definition, specify the CHANGE RECORD Structure Change Clause. Specify the DELETE keyword, followed by the name of the definition you are removing. If you are deleting a constraint, you must delete the constraint before you delete the field; they cannot be deleted simultaneously using the CHANGE RECORD command. To update the change in the database, you must integrate each change separately.
9.3 – Examples
1.CDO> CHANGE RECORD SUPPLIER_REC cont> ROW_MAJOR ARRAY 1:20. cont> END RECORD. This example uses the CHANGE RECORD command to add an array clause to a record called SUPPLIER_REC. 2.CDO> CHANGE RECORD EMPLOYEE_WORK_SCHEDULE cont> NONAME COBOL. cont> END RECORD. In this example, the CHANGE RECORD command uses the NO keyword to remove the NAME FOR COBOL record property from the EMPLOYEE_ WORK_SCHEDULE record definition. 3.CDO> CHANGE RECORD EMP_ADDRESS. cont> DELETE DEPT_CODE. cont> END RECORD. In this example, the CHANGE RECORD command deletes the DEPT_ CODE field definition. 4.CDO> CHANGE RECORD EMP_ADDRESS. cont> DEFINE EMP_NAME. cont> END EMP_NAME DEFINE. cont> END RECORD. In this example, the CHANGE RECORD command adds the EMP_NAME record definition to the EMP_ADDRESS record element. 5.CDO> CHANGE RECORD EMPLOYEE_REC cont> /* Adding new fields WAGE_STATUS and CLASS_CODE */. cont> DEFINE WAGE_STATUS. cont> END DEFINE. cont> DEFINE CLASS_CODE. cont> END DEFINE. cont> END EMPLOYEE-REC RECORD. To include an additional field in a record definition, use the CHANGE command with the DEFINE record property. The included field becomes the last field in the record definition. This example adds the fields WAGE_STATUS and CLASS_CODE to the record definition EMPLOYEE_REC.
10 – RECORD Included Name Change
Format global-field-name [ {BIT } ] [ {BYTE } ] [ ALIGNED ON {WORD } BOUNDARY ] [ {LONGWORD } ] [ {QUADWORD } ] [ {OCTAWORD } ] . [ NOALIGNED ] [ [ ] ] [ CONSTRAINT constr-name NOT NULL [DEFERRABLE ] ] [ [NOT DEFERRABLE ] ] [ ]
10.1 – Parameters
10.1.1 – global-field-name
Specifies the global field whose alignment you are creating or modifying.
10.1.2 – constr-name
Specifies a constraint for the field.
10.2 – Description
The Included Name Change Clause modifies or cancels the alignment of field or record definitions within a record element. To modify or cancel the alignment of field or record definitions within a structure definition, specify the Structure Change Clause, then the Included Name Change Clause. To modify or cancel the alignment of field or record definitions within a variant definition, specify the Variants Change Clause, then the Included Name Change Clause. To indicate the position of the variant, insert as many VARIANT and END VARIANT keywords as necessary, so each preceding variant is referenced. NOTE When the CHANGE RECORD command is used to change a variants or variant definition or an entity inside a variants or variant definition, you must use the Variants Change Clause to refer to each variants or variant definition that precedes the entity you are changing.
10.3 – Examples
1.CDO> CHANGE RECORD PRODUCT_INVENTORY. cont> PART_NUMBER ALIGNED ON BYTE BOUNDARY. cont> END PRODUCT_INVENTORY RECORD. In this example, the ALIGNED keyword in the CHANGE RECORD command realigns the PART_NUMBER field definition within the PRODUCT_INVENTORY record definition. 2.CDO> CHANGE RECORD PRODUCT_INVENTORY. cont> HOME_APPLIANCES NOALIGNED. cont> END PRODUCT_INVENTORY RECORD. In this example, the NOALIGNED keyword in the CHANGE RECORD command cancels the explicit alignment of the HOME_APPLIANCES record definition within the PRODUCT_INVENTORY record definition.
11 – RECORD Record Change
Format { included-name-clause } { local-field-clause } DEFINE { structure-name-clause } END [ name ] DEFINE . { } { variants-clause }
11.1 – Parameters
11.1.1 – included-name-clause
Includes existing field and record definitions in a record element. See DEFINE RECORD_Included_Name command for more information.
11.1.2 – local-field-clause
Adds the definition of a local field. See DEFINE RECORD_Local_Field command for more information.
11.1.3 – structure-name-clause
Adds a structure definition within a record element. For more information, see the DEFINE RECORD_Structure_Name command.
11.1.4 – variants-clause
Specifies a variants definition that you want to change. For more information, see the DEFINE RECORD_Variants command.
11.1.5 – name
Specifies the definition you are adding or removing within a record element.
11.2 – Description
Adds field, record, structure, variants, and variant definitions within an existing record definition. You cannot remove a variant definition from a record with the Record Change Clause. Use the Variants Change Clause instead. If you want to add a definition to a record element, but you do not want the definition to be added within an existing structure or variant definition, specify the DEFINE keyword, followed by the appropriate clause for the type of definition you are adding: o To add a field or record definition, use the Included Name Clause or the Local Field Clause. o To create a structure definition, use the Structure Clause. o To create a variants definition, use the Variants Clause. Any definition you add becomes the last definition in the record you are changing. If you want to remove a field, record, or structure definition from a record element, and these are not contained within a structure or variant definition, specify the DELETE keyword, followed by the appropriate clause for the type of definition you are removing. To add a definition within a structure definition, specify the Structure Change Clause. This clause contains an embedded Record Change Clause where you specify the DEFINE keyword, followed by the appropriate clause for the definition you are adding. To remove a definition from within a structure definition, specify the Structure Change Clause. Specify the DELETE keyword, followed by the name of the definition you are removing. To add a definition within a variant definition, specify the Variants Change Clause. This clause contains an embedded Record Change Clause where you specify the DEFINE keyword, followed by the appropriate clause for the definition you are adding. To indicate the position of the variant, insert as many VARIANT and END VARIANT keywords as necessary, so each preceding variant is referenced. To remove a definition within a variant definition, use the NOVARIANTS or the NOVARIANT keyword of the Variants Change Clause. NOTE When the CHANGE RECORD command is used to change a variants or variant definition or an entity inside a variants or variant definition, you must use the Variants Change Clause to refer to each variants or variant definition that precedes the entity you are changing.
11.3 – Examples
1.CDO> CHANGE RECORD EMP_ADDRESS. cont> DEFINE EMP_NAME. cont> END EMP_NAME DEFINE. cont> END RECORD. With the Record Change Clause, the CHANGE RECORD command adds the EMP_NAME record definition to the EMP_ADDRESS record definition. 2.CDO> CHANGE RECORD EMP_ADDRESS. cont> DELETE DEPT_CODE. cont> END RECORD. With the Record Change Clause, the CHANGE RECORD command deletes the DEPT_CODE field definition. 3.CDO> DEFINE RECORD COMPANY_INVENTORY. cont> STOCK STRUCTURE. cont> DESCRIPTION IS /* RECORD_IDENTIFIER determines field type: */ cont> /* S = In-stock record */ cont> /* B = Back-order record */ cont> /* O = Out-of-stock record. */ cont> RECORD_IDENTIFIER. cont> VARIANTS. cont> IN_STOCK STRUCTURE. cont> PRODUCT_NO. cont> DATE_ORDERED. cont> STATUS_CODE. cont> QUANTITY. cont> LOCATION. cont> UNIT_PRICE. cont> END IN_STOCK STRUCTURE. cont> END VARIANT. cont> VARIANT EXPRESSION IS "B". cont> BACK_ORDER STRUCTURE. cont> PRODUCT_NO. cont> DATE_ORDERED. cont> STATUS_CODE. cont> QUANTITY. cont> SUPPLIER. cont> UNIT_PRICE. cont> END BACK_ORDER STRUCTURE. cont> END VARIANT. cont> VARIANT EXPRESSION IS "O". cont> OUT_OF_STOCK STRUCTURE. cont> PRODUCT_NO. cont> DATE_LAST_SOLD. cont> END OUT_OF_STOCK STRUCTURE. cont> END VARIANT. cont> END VARIANTS. cont> END STOCK STRUCTURE. cont> END COMPANY_INVENTORY RECORD. CDO> CDO> CHANGE RECORD COMPANY_INVENTORY. cont> STOCK STRUCTURE. cont> RECORD_IDENTIFIER. cont> VARIANTS. cont> VARIANT EXPRESSION IS "S". cont> IN_STOCK STRUCTURE. cont> DELETE STATUS_CODE. cont> END IN_STOCK STRUCTURE. cont> END VARIANT. cont> VARIANT EXPRESSION IS "B". cont> BACK_ORDER STRUCTURE. cont> PRODUCT_NO. cont> DATE_ORDERED. cont> DEFINE DATE_PROMISED cont> END DATE_PROMISED DEFINE. cont> END BACK_ORDER STRUCTURE. cont> END VARIANT. cont> VARIANT EXPRESSION IS "O". cont> OUT_OF_STOCK STRUCTURE. cont> END OUT_OF_STOCK STRUCTURE. cont> END VARIANT. cont> END VARIANTS. cont> END STOCK STRUCTURE. cont> END COMPANY_INVENTORY RECORD. This example shows how to use the Record Change Clause to define or delete entities within a structure or variant definition. The first part of the example shows the COMPANY_INVENTORY record definition. The second part of the example shows how you would use the appropriate syntax and the Record Change Clause to add and remove definitions within a structure and variant. The STATUS_CODE field is removed from the IN_STOCK structure and the DATE_PROMISED field is added to the BACK_ORDER structure.
12 – RECORD Structure Change
Format structure-name STRUCTURE [ DESCRIPTION IS /*text*/ ] [ NODESCRIPTION ] [ ] [ record-property ] [ NOrecord-property ] ... . [ ] [ DELETE name . ] ... [ included-name-change-clause ] [ local-field-clause ] [ record-change-clause ] ... [ structure-change-clause ] [ ] [ variants-change-clause ] END [ structure-name ] STRUCTURE .
12.1 – Parameters
12.1.1 – structure-name
Specifies the structure definition you are changing.
12.1.2 – text
Documents the structure definition. Valid delimiters are /* */ or double quotation marks (" "). You can use Japanese to document comments in the DESCRIPTION clause for a field. To do this, use the SET CHARACTER_SET command, and set the character_set of the session to DEC_KANJI.
12.1.3 – record-property
Changes the value of an existing property, or adds a new property, in the structure definition. You specify removal with the NO keyword. See rec-properties for the record properties CDO provides.
12.1.4 – name
Specifies the name of a record, structure, or field that you want to delete from the record.
12.1.5 – included-name-change-clause
Changes the alignment of a field or record definition within a structure definition. See CHANGE RECORD_Included_Name_Change command for more information.
12.1.6 – local-field-clause
Changes the definition of a local field. See DEFINE RECORD_Local_Field command for more information.
12.1.7 – record-change-clause
Adds field, record, structure, variants, and variant definitions within a structure definition. Removes field, record, and structure definitions from within a structure definition. See CHANGE RECORD_Record_Change command for more information.
12.1.8 – structure-change-clause
Changes a structure definition within a structure definition. (This section describes the Structure Change Clause.)
12.1.9 – variants-change-clause
Specifies a variant definition that you want to change or remove from a structure definition. See CHANGE RECORD_Variants_Change command for more information.
12.2 – Description
The Structure Change Clause adds or modifies field, record, structure, and variant definitions within a structure definition. It removes field, record, and structure definitions. You cannot remove a variant definition from a structure definition with the Structure Change Clause. Use the Variants Change Clause instead. To add a definition within a structure definition, specify the Structure Change Clause, which contains an embedded Record Change Clause. Use the DEFINE keyword of the Record Change Clause, followed by the appropriate clause for the definition you are adding. For example, to add a field or record definition to the structure definition, specify the Included Name Clause or Local Field Clause. To add a structure definition, specify the Structure Change Clause. To add a variants definition, specify the Variants Change Clause. The definition you add becomes the last definition in the structure definition. To remove a definition from within a structure definition, specify the Structure Change Clause and the DELETE keyword of the embedded Record Change Clause, followed by the definition name. NOTE When you use the CHANGE RECORD command to change a variants or variant definition or an entity inside a variants or variant definition, you must use the Variants Change Clause to refer to each variants or variant definition that precedes the entity you are changing.
12.3 – Examples
CDO> CHANGE RECORD HOUSEHOLD. cont> DELETE ADDRESS. cont> DEPENDENTS STRUCTURE OCCURS 1 TO 4 TIMES cont> DEPENDING ON NUMBER_OF_DEPENDENTS IN HOUSEHOLD. cont> END DEPENDENTS STRUCTURE. cont> END HOUSEHOLD RECORD. In this example, the CHANGE RECORD command removes the ADDRESS field definition and changes the OCCURS...DEPENDING clause in the HOUSEHOLD record definition.
13 – RECORD Variant Change
Format { [[ EXPRESSION IS cond-expr ] ] } { [[ ] . ] } { [[ NOEXPRESSION ] ] } { [[ DELETE name . ] ... ] } { [[ included-name-change-clause ] ] } { [[ ] ] } { VARIANT [[ local-field-clause ] ] END VARIANT . } { [[ ] ] } { [[ record-change-clause ] ... ] } { [[ ] ] } { [[ structure-change-clause ] ] } { [[ variants-change-clause ] ] } { [ ] }
13.1 – Parameters
13.1.1 – cond-expr
Specifies an expression that represents the relationship between two value expressions. The value of a conditional expression is true, false, or null. If one definition uses an expression, each definition in the variant definition must have an expression. Each expression in the Variant Change Clause must be unique. For more information on conditional expressions, see Expressions.
13.1.2 – name
Specifies the name of a record, structure, or field that you want to delete from the record.
13.1.3 – included-name-change-clause
Changes the attribute of a field or record definition within a record element. See CHANGE RECORD_Record_Change command for more information.
13.1.4 – local-field-clause
Changes the definition of a local field. See DEFINE RECORD_Local_Field command for more information.
13.1.5 – record-change-clause
Adds field, record, structure, and variant definitions within a structure definition. Removes field, record, and structure definitions from within a structure definition. See CHANGE RECORD_Record_Change command for more information.
13.1.6 – structure-change-clause
Changes a structure definition within a record element. See CHANGE RECORD_Structure_Change command for more information.
13.1.7 – variants-change-clause
Specifies a variants definition that you want to change or remove from a record definition.
13.2 – Description
The Variant Change Clause modifies or removes a variant definition within a variants definition. When you change or add a variant definition to a record definition, you must tell CDO its position. To indicate the position of a variant definition to CDO, you use the VARIANT and END VARIANT keywords, so each preceding variant is referenced. If you specify a conditional expression, the expression must be valid for the layered product that uses your definition. If one definition uses an expression, each definition in the variant definition must use an expression. Each expression in the Variant Change Clause must be unique. To add a definition to a variants or variant definition, use the Variant Change Clause to specify the variants or variant you want to modify. Then use the DEFINE keyword of the Record Change Clause and the appropriate clause for the type of entity definition you are adding. NOTE You must include a structure definition for each variant contained in a CDO record if developing a new application that will use a 3GL language and DIGITAL DATATRIEVE. For example, to add a field or record definition to the variants or variant definition, use the Included Name Change Clause. To create a structure definition in the variants or variant definition, use the Structure Clause. To create another variant or variant definition in the variants or variant definition, use the Variant Change Clause. To remove a field, record, or structure definition from a variants or variant definition, use the Variant Change Clause or the Variants Change Clause to specify the variants or variant definition you are changing. Then remove the field, record, or structure definition by specifying the DELETE keyword of the Record Change Clause and the definition name. To remove a variant definition, use the NOVARIANT keyword of the Variants Change Clause to specify the definitions you are removing. When you add a new definition it becomes the last definition in a variant definition.
13.3 – Examples
CDO> CHANGE RECORD EMPLOYEE_RECORD. cont> VARIANTS. cont> VARIANT. cont> END VARIANT. cont> VARIANT. cont> END VARIANT. cont> VARIANT. cont> DELETE RATE. cont> END VARIANT. cont> END VARIANTS. cont> END EMPLOYEE_REC RECORD. In this example, the keyword DELETE in the CHANGE RECORD command removes the RATE field definition from the EMPLOYEE_RECORD record definition. The CHANGE RECORD command does not affect the other two definitions in the variant definition. To indicate that the RATE field definition is in the third variant definition, you must use the Variants Change Clause as shown in this example. The keywords VARIANT and END VARIANT serve as placeholders for those variant definitions that you do not want to change.
14 – RECORD Variants Change
Format { {variant-change-clause } } { VARIANTS. {NOVARIANT. } ... END VARIANTS . } { { } } { NOVARIANTS. }
14.1 – Parameters
14.1.1 – variant-change-clause
Specifies a variant definition that you want to change or remove from a record definition. See the CHANGE RECORD_Variant_Change command for more information.
14.2 – Description
The Variants Change Clause modifies or removes a variants definition within a record definition. The NOVARIANTS clause removes a group of variant definitions from a record definition. The NOVARIANT clause removes a specific variant definition from a record definition. To remove a variants definition, use the NOVARIANTS keyword of the Variants Change Clause to specify the definitions you are removing. NOTE When the CHANGE RECORD command is used to change a variants or variant definition or an entity inside a variants or variant definition, you must use the Variants Change Clause to refer to each variants or variant definition that precedes the entity you are changing.
14.3 – Examples
CDO> CHANGE RECORD EMPLOYEE_RECORD. cont> VARIANTS. cont> VARIANT. cont> END VARIANT. cont> VARIANT. cont> END VARIANT. cont> VARIANT. cont> DELETE RATE. cont> END VARIANT. cont> END VARIANTS. cont> END EMPLOYEE_REC RECORD. In this example, the keyword DELETE in the CHANGE RECORD command removes the RATE field definition from the EMPLOYEE_RECORD record definition. The CHANGE RECORD command does not affect the other two definitions in the variant definition. To indicate that the RATE field definition is in the third variant definition, you must use the Variants Change Clause as shown in this example. The keywords VARIANT and END VARIANT serve as placeholders for those variant definitions that you do not want to change.