CDD/Plus CDO CHANGE — VMS CDD+_4.1A
Additional information available:
DATABASEFIELDGENERICPROTECTIONRECORD
DATABASE
Allows you to make one or more of the following changes: o Modify the description for an RMS database definition. o Add a history list entry to an RMS database definition. o Change the location of a physical RMS database on disk. CHANGE_DATABASE_ ──────> database-name ────────────>───────────┐ ┌────────────────────────────────<────────────────────────────────┘ └┬┬──────────────────>──────────────┬─┬─┬─────────────────────┬─> . │├>
D
E
S
C
R
I
P
T
I
O
N typebox (I)typebox (S) ─┬> typebox (/)typebox (*) text */ ─┘ │ └> typebox (O)typebox (N) vms-file-name ─┘ │└>
A
U
D
I
T typebox (I)typebox (S) ──────┘ │ └───────────────────<────────────────┘
Additional information available:
database-nametextvms-file-nameExamples
database-name
The name of a physical RMS database.
text
If entered with the DESCRIPTION clause, the text documents the database definition. If entered with the AUDIT clause, the text becomes a history list entry for the database definition.
vms-file-name
A VMS file name that specifies the new location on disk of the physical RMS database. The name must be a character string having from 1 to 1024 characters.
Examples
The following example shows how to move a physical RMS database, DISG_FILE, to a new location on disk: CDO> CHANGE DATABASE DISG_FILE ON MYDISK:[SMITH.PERSONNEL]EMP.DAT. moving file MYDISK:[SMITH]EMP.DAT; to MYDISK:[SMITH.PERSONNEL]EMP.DAT;, proceed? [Y/N] (N)Y %CDO-I-FILECRE, file MYDISK:[SMITH.PERSONNEL]EMP.DAT; created %CDO-I-FILECRE, file MYDISK:[SMITH]EMP.DAT; deleted CDO> The following example shows how a description and a history list entry are entered for the SSG_FILE database: CDO> CHANGE DATABASE SSG_FILE cont> DESCRIPTION IS "STORES INFORMATION ON SHIPPING EMPLOYEES" cont> AUDIT IS "DESCRIPTION ENTERED 12/3/87". CDO> The SHOW DATABASE command displays the changes made to SSG_FILE: CDO> SHOW DATABASE/ALL SSG_FILE Definition of database SSG_FILE | acl (IDENTIFIER=[VCD,MCGUIRE],ACCESS=READ+ | WRITE+MODIFY+ERASE+SHOW+DEFINE+CHANGE+DELETE+CONTROL+OPERATOR+ | ADMINISTRATOR) | (IDENTIFIER=[*,*],ACCESS=READ+WRITE+MODIFY | +ERASE+SHOW+OPERATOR+ADMINISTRATOR) | Created time 3-DEC-1987 13:45:21.60 | Description 'STORES INFORMATION ON SHIPPING EMPLOYEES' | Modified time 3-DEC-1987 14:19:25.53 | Owner MCGUIRE | | History entered by MCGUIRE ([VCD,MCGUIRE]) | | using CDO V1.0 | | to CREATE definition on 3-DEC-1987 13:45:20.76 | | History entered by MCGUIRE ([VCD,MCGUIRE]) | | using CDO V1.0 | | to MODIFY on 3-DEC-1987 14:19:24.59 | | Explanation: | | DESCRIPTION ENTERED 12/3/87 | database in file USR02:[MCGUIRE.RDB]EMP.DAT | | fully qualified file USR02:[MCGUIRE.RDB]EMP.DAT; | database uses RMS database EMPLOYEE_STORAGE | | database uses record EMPLOYEE_REC | | | | History entered by MCGUIRE ([VCD,MCGUIRE]) | | | | using CDO V1.0 | | | | to CREATE definition on 3-DEC-1987 13:44:46.80 | | | Contains field LAST_NAME | | | | Datatype text size is 30 characters | | | | | History entered by MCGUIRE ([VCD,MCGUIRE]) | | | | | using CDO V1.0 | | | | | to CREATE definition on 3-DEC-1987 13:44:43.01 | | | Contains field FIRST_NAME | | | | Datatype text size is 20 characters | | | | | History entered by MCGUIRE ([VCD,MCGUIRE]) | | | | | using CDO V1.0 | | | | | to CREATE definition on 3-DEC-1987 13:44:44.71 | | | Contains field EMP_ID | | | | Datatype unsigned longword | | | | | History entered by MCGUIRE ([VCD,MCGUIRE]) | | | | | using CDO V1.0 | | | | | to CREATE definition on 3-DEC-1987 13:44:45.61 | | file definition | | | file allocation 200 | | | file contiguous | | | file organization index sequential | | | key 0 | | | | key changes | | | | key duplicates | | | | segment LAST_NAME IN EMPLOYEE_REC | | | key 1 | | | | key changes | | | | segment EMP_ID IN EMPLOYEE_REC CDO> In the following example, CHANGE DATABASE adds a history list entry to the RMS database DBS_FILE: CDO> CHANGE DATABASE DBS_FILE cont> AUDIT IS /* FILE CREATED FOR DISBURSEMENTS */. CDO> SHOW DATABASE/AUDIT displays the new history list entry to the RMS database DBS_FILE: CDO> SHOW DATABASE/AUDIT DBS_FILE Definition of DBS_FILE (Type : CDD$DATABASE) | History entered by MCGUIRE ([VCD,MCGUIRE]) | using CDO V1.0 | to CREATE definition on 3-DEC-1987 13:45:25.86 | History entered by MCGUIRE ([VCD,MCGUIRE]) | using CDO V1.0 | to MODIFY on 3-DEC-1987 14:26:26.63 | Explanation: | FILE CREATED FOR DISBURSEMENTS CDO>
FIELD
Modifies a field definition in a CDO dictionary. This command does not create a new version of the field definition. You use this command to CHANGE a field definition in place. CHANGE FIELD ─> field-name ─┬─┬──────────────────────────────────┬─┬─┐ │ ├>
D
E
S
C
R
I
P
T
I
O
N typebox (I)typebox (S) ─┬─> typebox (/)typebox (*) text */ ─┤ │ │ │ ├>
A
U
D
I
T typebox (I)typebox (S) ───────┘ │ │ │ │ └>
N
O
D
E
S
C
R
I
P
T
I
O
N ──────────────────┘ │ │ └────────────────────<─────────────────┘ │ ┌─────────────────────────────<──────────────────────────────────┘ └─────────┬─┬──────────────>─────────────┬─┬────────> . │ ├─> field-attributes ────────┤ │ │ └─> cancel-field-attributes ─┘ │ └────────────────<───────────────┘
Additional information available:
field-nametextfield-attributescancel-field-attributesExamples
field-name
The name of the field definition you want to change.
text
If entered with the DESCRIPTION clause, the text documents the field definition. If entered with the AUDIT clause, the text becomes a history list entry for the field definition.
field-attributes
A list of definitions that indicate what type of data you can store in the field and how CDO uses that data. See the top-level topic "field-attr" for a diagram of field attributes.
cancel-field-attributes
Used to remove field attributes from field definitions. See the top-level topic "field-attr" for a diagram of keywords that remove existing field attributes from field definitions.
Examples
The following command removes the MISSING_VALUE attribute from the field PRICE: CDO> CHANGE FIELD PRICE cont> NOMISSING_VALUE. CDO> The following command modifies the datatype and missing value of the field ORDER_INDEX: CDO> CHANGE FIELD ORDER_INDEX cont> DATATYPE IS UNSIGNED LONGWORD cont> MISSING_VALUE IS 0. CDO> The following command shows that multiple lines of text can be entered for both the DESCRIPTION and AUDIT clauses, and that both the /* */ and the " " delimiters are acceptable: CDO> CHANGE FIELD ZIP_CODE cont> DESCRIPTION IS /* This is the nine character postal code */ cont> /* which replaces the five character postal code */ cont> AUDIT IS "Changed at beginning of new fiscal period" cont> "July 1, 1987" cont> DATATYPE IS UNSIGNED NUMERIC cont> SIZE IS 9 DIGITS. CDO> Field definition FLD_A is used in an Rdb database that uses a CDO dictionary, so CDO specifies the name of the database (MY_RDB_DB) that may need to be integrated after FLD_A has been CHANGED in place: CDO> CHANGE FIELD FLD_A cont> DATATYPE IS SIGNED LONGWORD. %CDO-I-DBMBR, database USR$DISK:[RICK.NEWDICT]MY_RDB_DB;1 may need to be INTEGRATED CDO>
GENERIC
Modifies entity definitions in a CDO dictionary. This command does not create a new version of the entity definition. You use this command to CHANGE an entity definition in place. CHANGE GENERIC ────> protocol-name entity-name ──────────────┐ ┌───────────────────────────────<────────────────────────────┘ └┬┬───────────────>─────────────────┬┬─┬┬───────────>────────┬┬> .─┬┬─┐ │├>
D
E
S
C
R
I
P
T
I
O
N typebox (I)typebox (S) ─┬> typebox (/)typebox (*) text */ ─┤│ │└> change-attribute ─┘│ ││ │ │├>
A
U
D
I
T typebox (I)typebox (S) ───────┘ ││ └────────────<─────────┘ ││ │ │└>
N
O
D
E
S
C
R
I
P
T
I
O
N ─────────────────┘│ ││ │ └────────────────<──────────────────┘ ││ │ ┌───────────────────────────────<──────────────────────────────────┘│ │ └─┬─┬──────────>─────────────┬──┬──────┐ │ │ │ └> define-relationship ─┘ │ │ │ │ └───────────<─────────────────┘ │ │ │ ┌──────────────────────<───────────────┴────────────────────────────┘ │ └──┬┬────────────────────────>───────────────────────────┬────┬──┐ │ │└>
D
E
L
E
T
E relationship-name relationship-mbr ─> . ─┘ │ │ │ └───────────────────────────<──────────────────────────────┘ │ │ ┌──────────────────────────────<────────────────────────────────┴────┘ └──>
E
N
D ─┬───────>────────┬─> protocol-name ────> . └─> entity-name ─┘ change-attribute= ──┬─> attribute-name IS ─────┬─> n ─────────────┬────┬────> │ └─> quoted-string ─┘ │ └─>
N
O attribute-name ─────────────────────────────┘ attribute= ───> attribute-name IS ─────┬─> n ──────────────┬─────────────> └─> quoted-string ──┘
Additional information available:
protocol-nameentity-nametextchange-attributeattribute-name
nquoted-stringrelationship-namerelationship-mbrattribute
Examples
protocol-name
The name of the protocol that the entity definition you want to change is based on.
entity-name
The name of the entity definition you are changing.
text
If entered with the DESCRIPTION clause, the text documents the generic entity definition. If entered with the AUDIT clause, the text becomes a history list entry for the generic entity definition.
change-attribute
A clause that allows you to change the value of an existing attribute, to add an attribute to the entity definition, or to remove an existing attribute from the entity definition. You remove an existing attribute from an entity definition by specifying the keyword "NO" and the name of the attribute you want to delete.
attribute-name
The name of an existing attribute in the entity definition whose value you want to change, or the name of an attribute you want to add to the entity definition, or the name of an attribute you want to remove from the entity definition.
n
The value that you want recorded in this attribute. Replace n with the appropriate number if the attribute requires a numerical value.
quoted-string
The value that you want recorded in this attribute. You enter a string if the attribute requires a string. You must enclose the string in quotation marks.
relationship-name
The relationship you want to define or delete in the entity definition you are changing. Any relationship you define must be specified in the entity protocol on which this entity definition is based.
relationship-mbr
The name of the entity or relationship that you want to define or delete as a member of the relationship specified in relationship-name. This entity or relationship must already exist in the dictionary.
attribute
The attribute-name you provide in this clause must be an instance of an attribute protocol that is specified in the relationship-name protocol.
Examples
The following command changes the processing name attribute of the MY_PROGRAM entity based on the CDD$EXECUTABLE_IMAGE protocol: CDO> CHANGE GENERIC CDD$EXECUTABLE_IMAGE MY_PROGRAM cont> CDD$PROCESSING_NAME "OUR_PROGRAM". cont> END CDD$EXECUTABLE_IMAGE MY_PROGRAM. CDO>
PROTECTION
Changes access rights for an access control list entry (ACE) in an access control list (ACL) for a CDO definition or dictionary directory. An ACL is created at the same time as a dictionary object or directory. The ACEs in an ACL determine which users can access the definition and what operations each user can perform. When the CHANGE PROTECTION command executes, CDO modifies the specified ACE. The new ACE will consist of the access rights explicitly granted with the CHANGE PROTECTION command and the rights that were already part of the ACE and were not denied by the CHANGE PROTECTION command. Any rights that do not appear in the modified ACE are denied. See the help on DEFINE PROTECTION for an explanation of the default protection CDO applies to different types of CDO definitions. The same default protection provisions that apply to CDO definitions also apply to dictionary directories. CHANGE PROTECTION FOR ───┬─>
D
I
R
E
C
T
O
R
Y ────────────────┬───────────┐ ├─>
F
I
E
L
D ────────────────────┤ │ ├─>
R
E
C
O
R
D ───────────────────┤ │ └─>
G
E
N
E
R
I
C ─> protocol-name ─┘ │ ┌──────────────────────────────<───────────────────────────────────┘ └┬> object-name ─┬───┬────────>────────┬──>
A
C
C
E
S
S ─┬> right ─┬──> . └────── , <─────┘ ├─>
P
O
S
I
T
I
O
N n ──┬┘ └─── typebox (+) <──┘ └───┬─> id1 ─┬───┘ └─── typebox (+) <─┘
Additional information available:
protocol-nameobject-namenid1rightExamples
protocol-name
The name of the protocol that the generic entity definition whose ACE you want to change is based on.
object-name
The name of the dictionary object whose ACE you want to change.
n
The relative position in the ACL of the ACE you want to change. The first ACE in the ACL is 1, the second ACE is 2, and so on. Use a positive integer to replace n.
id1
The identifier or identifiers of the ACE you want to change.
right
The access rights that are granted to the users specified in the ACE.
Examples
The following command changes the ACE identified by [JONES]+INTERACTIVE to enable CONTROL and READ access rights to the PAYROLL and PROMOTION records: CDO> CHANGE PROTECTION RECORD PAYROLL, PROMOTION [JONES]+INTERACTIVE cont> ACCESS CONTROL+READ. CDO> The following command changes the third ACE in the ACL for the ID field. All access rights are disabled except READ. CDO> CHANGE PROTECTION FIELD ID POSITION 3 ACCESS NOALL+READ. CDO> If you do not specify the position in the ACL or the identifiers of the ACE you want to change, CDO changes the first ACE in the ACL. In the following command, CDO changes the first ACE in the ACL for record SALARY. After this command executes, the users whose identifiers match the identifiers in the first ACE will have no access to record SALARY: CDO> CHANGE PROTECTION FOR RECORD SALARY ACCESS NONE. CDO>
RECORD
Modifies a record definition in a CDO dictionary. This command does not create a new version of the record definition. You use this command to CHANGE a record definition in place. CHANGE RECORD ─> record-name ─┬─┬──────────────>──────────────────┬─┬─┐ │ ├>
D
E
S
C
R
I
P
T
I
O
N typebox (I)typebox (S) ─┬> typebox (/)typebox (*) text */ ─┤ │ │ │ ├>
A
U
D
I
T typebox (I)typebox (S) ───────┘ │ │ │ │ └>
N
O
D
E
S
C
R
I
P
T
I
O
N ─────────────────┘ │ │ └────────────────<────────────────────┘ │ ┌───────────────────────────────<─────────────────────────────────────┘ └────────────┬─┬─────────────>──────────────┬─┬─> . ──────────┐ │ └> record-attribute-changes ─┘ │ │ └───────────────<────────────────┘ │ ┌────────────────────────────<────────────────────────────────┘ └────────────┬─┬──────────────>─────────────┬──┬──────────────┐ │ ├─> record-change-clause ────┤ │ │ │ ├─> alignment-change-clause ─┤ │ │ │ ├─> structure-change-clause ─┤ │ │ │ └─> variant-change-clause ───┘ │ │ └────────────────<────────────────┘ │ ┌─────────────────────────────<───────────────────────────────┘ └─>
E
N
D ─┬───────────>────┬─> typebox (R)typebox (E)typebox (C)typebox (O)typebox (R)typebox (D) ─────> . └─> record-name ─┘
Additional information available:
record-nametextrecord-attribute-changesrecord-change-clausealignment-change-clause
structure-change-clausevariant-change-clauseExamples
record-name
The name of the record definition you want to change.
text
If entered with the DESCRIPTION clause, the text documents the record definition. If entered with the AUDIT clause, the text becomes a history list entry for the record definition.
record-attribute-changes
Used to add, change, or remove record attributes assigned to record, structure, variants and variant definitions within the record definition. See the top-level topic "record-attr" for a diagram of record attributes.
record-change-clause
Adds or removes field definitions and record definitions within a record definition. The clause creates new or deletes existing structure, variants, and individual variant definitions within a record definition. record-change-clause= ─┬>
D
E
F
I
N
E ─┬> included-name-clause ─┬─>
E
N
D─┬───────────────┬> . ─┬> │ ├> structure-clause ─────┤ ├> name DEFINE ─┤ │ │ └> variant-clause ───────┘ └>
D
E
F
I
N
E ──────┘ │ └>
D
E
L
E
T
E ─────> name. ───────────────────────────────────────────┘
Additional information available:
included-name-clausestructure-clausevariant-clausename
Examples
included-name-clause
Used to include existing field definitions and record definitions within record definitions. See the help on DEFINE RECORD for more information.
structure-clause
Used to create structure definitions within record definitions. See the help on DEFINE RECORD for more information.
variant-clause
Used to create variants definitions within record definitions. See the help on DEFINE RECORD for more information.
name
The name of the entity definition you are adding to or removing from the record definition.
Examples
The group of examples below shows how to use the RECORD-CHANGE clause to add or remove a field or record definition that is part of a record definition but is not contained within a structure or variant. The first command below creates a record definition named EMP_ADDRESS. The second command deletes the DEPT_CODE field. The third command adds the EMP_NAME record definition to the EMP_ADDRESS record. CDO> DEFINE RECORD EMP_ADDRESS. cont> SSAN. cont> DEPT_CODE. cont> ADDRESS. cont> END EMP_ADDRESS RECORD. CDO> CHANGE RECORD EMP_ADDRESS. cont> DELETE DEPT_CODE. cont> END RECORD. CDO> CHANGE RECORD EMP_ADDRESS. cont> DEFINE EMP_NAME. cont> END EMP_NAME DEFINE. cont> END RECORD. CDO>
alignment-change-clause
Changes the alignment of field definitions and record definitions
within a record definition.
alignment-change-clause=
─> name ─┬───────────────────>───────────────────────┬────┬───>
├─>
A
L
I
G
N
E
D typebox (O)typebox (N) ─┬─>
B
I
T ──────┬─> typebox (B)typebox (O)typebox (U)typebox (N)typebox (D)typebox (A)typebox (R)typebox (Y) ─┘ │
│ ├─>
B
Y
T
E ─────┤ │
│ ├─>
W
O
R
D ─────┤ │
│ ├─>
L
O
N
G
W
O
R
D ─┤ │
│ ├─>
Q
U
A
D
W
O
R
D ─┤ │
│ └─>
O
C
T
A
W
O
R
D ─┘ │
└─>
N
O
A
L
I
G
N
E
D ───────────────────────────────────┘
Additional information available:
name
The name of the field definition or record definition whose alignment you want to modify or cancel.
Examples
The following example shows how to realign a field within a record definition: CDO> CHANGE RECORD PRODUCT_INVENTORY. cont> PART_NUMBER ALIGNED ON BYTE BOUNDARY cont> END PRODUCT_INVENTORY RECORD. CDO> The following example shows how to cancel a record's alignment: CDO> CHANGE RECORD PRODUCT_INVENTORY. cont> HOME_APPLIANCES NOALIGNED cont> END PRODUCT_INVENTORY RECORD. CDO>
structure-change-clause
Changes structure definitions within record definitions. You can use the STRUCTURE-CHANGE clause to change a structure definition in several ways. You can add a description clause to a structure definition, or you can modify or delete the structure definition's existing description clause. You can add record attributes to a structure definition, or change or remove existing attributes. You can also use the STRUCTURE-CHANGE clause to identify a structure definition that you want to add an entity definition to or remove an entity definition from. structure-change-clause= ─> structure-name ─>
S
T
R
U
C
T
U
R
E ─┬──────────────>───────────────┬──┐ ├─>
D
E
S
C
R
I
P
T
I
O
N typebox (I)typebox (S) typebox (/)typebox (*) text */ ─┤ │ └─>
N
O
D
E
S
C
R
I
P
T
I
O
N ─────────────┘ │ ┌───────────────────────────────<─────────────────────────────────┘ └────────────┬─┬─────────────>──────────────┬─┬─> . ──────────┐ │ └> record-attribute-changes ─┘ │ │ └───────────────<────────────────┘ │ ┌────────────────────────────<────────────────────────────────┘ └────────────┬─┬──────────────>─────────────┬──┬──────────────┐ │ ├─> record-change-clause ────┤ │ │ │ ├─> alignment-change-clause ─┤ │ │ │ ├─> structure-change-clause ─┤ │ │ │ └─> variant-change-clause ───┘ │ │ └────────────────<────────────────┘ │ ┌─────────────────────────────<───────────────────────────────┘ └─>
E
N
D ─┬────────>─────────┬─┬───────>─────┬─> . ───> └> structure-name ─┘ └>
S
T
R
U
C
T
U
R
E ─┘
Additional information available:
structure-nametextrecord-attribute-changesrecord-change-clause
alignment-change-clausestructure-change-clausevariant-change-clauseExamples
structure-name
The name of the structure you are changing.
text
Documents the structure definition.
record-attribute-changes
Used to add attributes, change, or remove attributes from the structure specified in structure-name. See the top-level topic "record-attr" for a description and diagram of record attributes and how to remove them from record definitions.
record-change-clause
Adds field, record, structure, variants, and individual variant definitions within a structure definition. Removes field, record, and structure definitions from within a structure definition.
alignment-change-clause
Used to change the alignment of a field or record definition within a record definition.
structure-change-clause
Used to change a structure definition within a record definition.
variant-change-clause
Used to identify variants or variant definitions that you want to change. The VARIANT-CHANGE clause can also be used to remove variants or variant definitions from a record definition.
Examples
The two examples in this section refer to the record HOUSEHOLD. The following command defines the record HOUSEHOLD: CDO> DEFINE RECORD HOUSEHOLD. cont> ANNUAL_INCOME. cont> ADDRESS. cont> NUMBER_OF_DEPENDENTS. cont> DEPENDENTS STRUCTURE OCCURS 1 TO 10 TIMES cont> DEPENDING ON NUMBER_OF_DEPENDENTS IN HOUSEHOLD. cont> NAME. cont> AGE. cont> SEX. cont> END DEPENDENTS STRUCTURE. cont> END HOUSEHOLD RECORD. CDO> The following command removes the field ADDRESS from the record HOUSEHOLD and changes the OCCURS...DEPENDING clause: 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. CDO>
variant-change-clause
Changes variant definitions within record definitions. You can use the VARIANT-CHANGE clause to change variants or variant definitions in several ways. You can add an expression to a variant definition, or modify or remove an existing variant expression. You can use the clause to identify a variants or variant that you want to add an entity definition to or remove an entity definition from. You can also remove a variants or variant definition from a record definition by using the VARIANT-CHANGE clause. variant-change-clause= ─┬>
V
A
R
I
A
N
T
S. ─┬┬┬─>
V
A
R
I
A
N
T ─┬──────────────>─────────────┬─> . ─┐ │ │││ ├>
E
X
P
R
E
S
S
I
O
N typebox (I)typebox (S) cond-expr ──┤ │ │ │││ └>
N
O
E
X
P
R
E
S
S
I
O
N ─────────────┘ │ │ │││ ┌──────────────────────<───────────────────────┘ │ │││ └┬─┬─────────────>─────────────┬─┬>
E
N
D
V
A
R
I
A
N
T. ─┬┐ │ │││ │ ├> record-change-clause ────┤ │ ││ │ │││ │ ├> alignment-change-clause ─┤ │ ││ │ │││ │ ├> structure-change-clause ─┤ │ ││ │ │││ │ └> variant-change-clause ───┘ │ ││ │ │││ └───────────────<───────────────┘ ││ │ ││└───────────────────────<───────────────────────────┘│ │ ││ ┌──────────────────────<───────────────────────────┘ │ ││ └──────────────>
E
N
D
V
A
R
I
A
N
T
S. ────────┬──────┬───> │ │└──>
N
O
V
A
R
I
A
N
T. ──────┬─────────────>─────┘ │ │ └─────────<────────────┘ │ └>
N
O
V
A
R
I
A
N
T
S. ─────────────────────>───────────────────────────┘
Additional information available:
cond-exprrecord-change-clausealignment-change-clausestructure-change-clause
variant-change-clauseExample
cond-expr
Must be a valid conditional expression for the product that uses the definition. If one variant has an expression, each variant in the variants must have an expression. Each variant's expression in the variants must be unique. For more information on conditional expressions, see the subtopic "conditional_expr" under the top-level topic "expressions".
record-change-clause
Adds field, record, structure, variants, and individual variant definitions within a structure definition. Removes field, record, and structure definitions from within a structure definition.
alignment-change-clause
Used to change the alignment of a field or record definition within a record definition.
structure-change-clause
Used to change a structure definition within a record definition.
variant-change-clause
Used to identify variants or variant definitions that you want to change. The VARIANT-CHANGE clause can also be used to remove variants or variant definitions from a record definition.
Example
The following example deletes the field RATE in the third variant in the record EMPLOYEE_RECORD; none of the other variants are changed. Because the field RATE is inside the third variant of the variants definition, you must refer to the variants definition and the first two variant definitions with the VARIANT-CHANGE clause. This tells CDO which variants or variant definition you want to modify within the record definition: 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. CDO>
Examples
The following command uses the RECORD-ATTRIBUTE-CHANGES clause to remove the NAME FOR COBOL record attribute from the EMPLOYEE_WORK_SCHEDULE record: CDO> CHANGE RECORD EMPLOYEE_WORK_SCHEDULE cont> NONAME COBOL. cont> END RECORD. CDO> The following command uses the NODESCRIPTION clause to remove a comment from the NEW_HIRES record: CDO> CHANGE RECORD NEW_HIRES cont> NODESCRIPTION. cont> END RECORD. CDO> Record definition REC_B is used in an Rdb database that uses a CDO dictionary, so CDO specifies the name of the database (MY_RDB_DB) that may need to be integrated after REC_B has been CHANGED in place: CDO> CHANGE RECORD REC_B. cont> DELETE FLD_B. cont> END RECORD. %CDO-I-DBMBR, database USR$DISK:[RICK.NEWDICT]MY_RDB_DB;1 may need to be integrated CDO>