Previous Topic: Copy StructuresNext Topic: Disable and Enable Structures


Delete Structures

In DBMAINT Mode, use the DELETE function when you want to delete a DB Model structure or substructure definition from CA Datacom Datadictionary.

You can use the DELETE function with DATABASE, AREA, TABLE, KEY, ELEMENT, and DATAVIEW occurrences. To delete FIELD occurrences, see Update Field.

How It Works

When you delete a structure that is the root of the structure, all the entity-occurrences within the structure are also deleted. For example, when you delete an AREA substructure, the tables, fields, keys, and elements defined to the area are also deleted.

If there are no errors, you receive the CA Datacom/DB Structure Maintenance Menu with a message confirming successful deletion of the object.

The results of the DELETE function in CA Datacom Datadictionary vary depending on the status of the structure or substructure.

Relationships

Deleting a DATABASE, AREA, OR TABLE occurrence can affect a DATAVIEW occurrence which is related to the ELEMENT or KEY occurrence previously defined to these structures or substructures. Therefore, before you delete the database, area, or table, determine whether DATAVIEW occurrences are related to any occurrences in the structures and take the appropriate action.

Also, in another example, if you delete a DATABASE structure, this can affect a NODE occurrence, which is used by CA Datacom STAR, because NODE occurrences are related to DATABASE occurrences. Therefore, before you delete a database, determine whether NODE occurrences are related to the database. If you determine that NODE occurrences are defined and related to the database, use ENTMAINT Mode to delete the relationships between the node and the database before deleting the DATABASE structure in this mode.

For SQL Accessible Entity-Occurrences

Use the SQL DROP statement to delete SQL accessible tables, views, or synonyms. For more information, see the CA Datacom/DB SQL User Guide.

In HIST Status

With the proper authorization, you can delete a structure or substructure in HIST status. When the maximum number of allowed HIST status versions is reached, CA Datacom Datadictionary automatically deletes the structure or substructure with the oldest date/time stamp. The maximum number of HIST status versions is specified in the ENTY-HIST-VERS attribute of the TABLE occurrence for the entity-type in the DATA-DICT database.

More Information

In QUAL Status

An example of when you would want to delete an occurrence in QUAL status is when CA Datacom Datadictionary moves an entity-occurrence into QUAL status that was created or maintained by SQL and needs to be removed.

How to Use

Use one of the following procedures to perform this function:

When you select DELETE on the DB Structure Functions Menu, you receive a prompter panel similar to the following example. Press Enter after completing your entries.

=> => => 1-DDOL000196A - CMPP - PLEASE COMPLETE REQUIRED INFORMATION FOR COMMAND ------------------------------------------------------------------------------- DATACOM/DB Structure Maintenance TXCF DELETE TABLE ________________________________ in STATUS ____ DEL TBL (name) STAT (stat) with PASSWORD ____ using OVERRIDE ____ PSWD (pswd) OVRD (ovrd) PF1=HELP PF2=END PF3=CLARIFY PF4=PROCESS PF5=MENU PF6=STATUS PF7=SCB PF8=SCF PF9=APPLY PF10=PATH PF11=NEXT PF12=INPUT

The following list describes each field, the valid entries and the default (if one exists). Fields that require an entry are highlighted on your terminal. Fields which are not highlighted indicate that an entry is optional.

(name)

(Required) Specify the name of the occurrence you are deleting.

Valid Entries:

1- to 32-character occurrence name

Default Value:

(No default)

(stat)

(Required) Specify the status of the occurrence you are deleting.

Valid Entries:

TEST
T001—T999
PROD 001—999
QUAL (valid for TABLE, KEY, ELEMENT, and DATAVIEW entity-occurrences)
ALL

Default Value:

(No default)

(pswd)

Only required if this occurrence has protection against unauthorized maintenance with a password assignment. Supply the password for this occurrence.

Valid Entries:

1- to 4-character password

Default Value:

(No default)

(ovrd)

Only required if this occurrence is restricted from unauthorized maintenance or retrieval with a lock level assignment. Supply the override code.

Valid Entries:

1- to 4-character override code

Default Value:

(No default)