Previous Topic: Updating Key Attributes


Updating Field Attributes

When you update FIELD entity-occurrence attributes, changing the following attribute-values affect constraints:


Attribute

Type of
Constraint


Effect on Constraint

LENGTH

Check and
Foreign

Constraints become invalid because the offsets stored in the object change. The constraints are rebound by SQL the next time the table is accessed.

 

Unique

Constraints become invalid because the offsets stored in the object change and because the length of the table also changes. The constraints are rebound by SQL the next time the table is accessed.

The referencing constraints also become invalid because the offsets stored in the object change. The constraints are rebound by SQL the next time the table is accessed.

OFFSET

Check and
Foreign

Constraints become invalid because the offsets stored in the object change. The constraints are rebound by SQL the next time the table is accessed.

 

Unique

Constraints become invalid because the offsets stored in the object change and because the length of the table also changes. The constraints are rebound by SQL the next time the table is accessed.

The referencing constraints also become invalid because the offsets stored in the object change. The constraints are rebound by SQL the next time the table is. accessed.

AFTER

Check and
Foreign

Constraints become invalid because the offsets stored in the object change. The constraints are rebound by SQL the next time the table is accessed.

 

Unique

Constraints become invalid because the offsets stored in the object change. The constraints are rebound by SQL the next time the table is accessed.

The referencing constraints also become invalid because the offsets stored in the object change. The constraints are rebound by SQL the next time the table is accessed.

REPEAT

Check and
Foreign

Constraints become invalid because the offsets stored in the object change. The constraints are rebound by SQL the next time the table is accessed.

 

Unique

Constraints become invalid because the offsets stored in the object change and because the length of the table also changes. The constraints are rebound by SQL the next time the table is accessed.

The referencing constraints also become invalid because the offsets stored in the object change. The constraints are rebound by SQL the next time the table is accessed.

NULL-
INDICATOR

Check and
Foreign

Constraints become invalid because the offsets stored in the object change. The constraints are rebound by SQL the next time the table is accessed.

 

Unique

Constraints become invalid because the offsets stored in the object change and because the length of the table also changes. The constraints are rebound by SQL the next time the table is accessed.

The referencing constraints also become invalid because the offsets stored in the object change. The constraints are rebound by SQL the next time the table is accessed.

TYPE

Check and
Foreign

Constraints become invalid because the offsets stored in the object change. The constraints are rebound by SQL the next time the table is accessed.

 

Unique

Constraints become invalid because the offsets stored in the object change and because the length of the table also changes. The constraints are rebound by SQL the next time the table is accessed.

The referencing constraints also become invalid. The constraints are rebound by SQL the next time the table is accessed.

DECIMALS

Check,
Foreign,and
Unique

Constraints become invalid because the data stored in the object may need to be updated as a result of this change. The constraints are rebound by SQL the next time the table is accessed.

The referencing constraints also become invalid and are rebound by SQL the next time the table is accessed.

REDEFINES
(updating from N to S or P for constraint field)

Check

CA Datacom Datadictionary generates a DSF return code CON when you attempt to change the value of this attribute from N to S or P. It is the same as deleting a field from the table. Drop the constraint before making the change.

 

Foreign and
Unique

This action is not allowed because the rebind recreates the key as before adding a new key since the source of the constraints reflects the old column list.

CA Datacom Datadictionary generates a DSF return code CON when you attempt to change the value of this attribute from N to S or P. Drop the constraint before making the change.

REDEFINES
(updating from N to S or P for other fields)

Check and
Foreign

Constraints become invalid because offsets stored in the object change. The constraints are rebound by SQL the next time the table is accessed.

 

Unique

Constraints become invalid because offsets stored in the object change and because the length of the table also changes. The constraints are rebound by SQL the next time the table is accessed.

The referencing constraints also become invalid and are rebound by SQL the next time the table is accessed.

REDEFINES (updating from S or P to N)

Check

Constraints become invalid because offsets stored in the object change. The constraints are rebound by SQL the next time the table is accessed.

 

Foreign

CA Datacom Datadictionary generates a DSF return code CON when you attempt to change this value from S or P to N, if the field is in a key representing a Foreign constraint.

If the field being updated is not in the Foreign key, all Foreign constraints become invalid.

 

Unique

Constraints become invalid because offsets stored in the object change and because the length of the table also changes. The constraints are rebound by SQL the next time the table is accessed.

Because this action is the same as adding a field, it is not allowed if the field is in a key that represents a Unique constraint. CA Datacom Datadictionary generates a DSF return code CON if you attempt to change a field in this manner.

The referencing constraints also become invalid and are rebound by SQL the next time the table is accessed.

CLASS
(updating from S to another value for constraint field)

Check

CA Datacom Datadictionary generates a DSF return code CON when you attempt to change the value of this attribute to another value from S, since this is the equivalent of deleting a column for SQL. Drop the constraint before making the change.

 

Foreign and Unique

This action is not allowed because the rebind recreates the key as it was before adding a new key since the source of the constraints reflects the old column list.

CA Datacom Datadictionary generates a DSF return code CON when you attempt to change the value of this attribute from S to another value. Drop the constraint before making the change.

CLASS
(updating from S to another value for other fields)

Check and
Foreign

Constraints become invalid because offsets stored in the object change. The constraints are rebound by SQL the next time the table is accessed.

 

Unique

Constraints become invalid because offsets stored in the object change and because the length of the table also changes. The constraints are rebound by SQL the next time the table is accessed.

The referencing constraints also become invalid and are rebound by SQL the next time the table is accessed.

CLASS
(updating to S)

Check

Constraints become invalid because offsets stored in the object change. The constraints are rebound by SQL the next time the table is accessed.

 

Foreign

CA Datacom Datadictionary generates a DSF return code CON when you attempt to change this value to an S if the field is in a key representing a Foreign constraint. If the field being updated is not in the Foreign key, all Foreign constraints become invalid.

 

Unique

Constraints become invalid because offsets stored in the object change and because the length of the table also changes. The constraints are rebound by SQL the next time the table is accessed.

Because this action is the same as adding a field, it is not allowed if the field is in a key that represents a Unique constraint. CA Datacom Datadictionary generates a DSF return code CON if you attempt to change a field in this manner.

The referencing constraints also become invalid and are rebound by SQL the next time the table is accessed.

SIGN or TYPE-
NUMERIC
(for constraint field)

Check,
Foreign, and
Unique

Constraints become invalid because the data stored in the object may need to be updated as a result of this change.

The referencing constraints also become invalid and are rebound by SQL the next time the table is accessed.

SQLNAME

Check,
Foreign, and
Unique

Not allowed in PROD status. CA Datacom Datadictionary generates an error (SB9).

Not allowed in TEST status if the field is related to a constraint of any type. CA Datacom Datadictionary generates a DSF return code CON.