Previous Topic: Add AREA SubstructuresNext Topic: Implicit Method


Add ELEMENT Substructures

The ADD ELEMENT function allows you to define the base occurrence of an ELEMENT substructure. CA Datacom Datadictionary automatically relates the ELEMENT occurrence to the existing TABLE occurrence that you specify.

An element contains one or more contiguous fields. Because elements are the units of data transfer between the database and programs, define elements that contain groups of fields that are usually accessed together by your programs.

You can define an ELEMENT occurrence by using one of the following procedures:

When you select the ADD option on the ELEMENT Structure Functions Panel, you receive the following prompter panel:

=> => => 1-DDOL000196A - CMPP - PLEASE COMPLETE REQUIRED INFORMATION FOR COMMAND ----------------------------------------------------------------------------- DATACOM/DB Structure Maintenance TACF ADD ELEMENT ________________________________ ADD ELM (name) TO TABLE ________________________________ in STATUS ____ TO TBL (name) STA (status) with PASSWORD using LOCK 0 LIKE ________________________________ PSWD (pswd) LOC (lock) LIKE (name) 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.

ELEMENT (name)

(Required) Specify the name for the occurrence you are adding.

Valid Entries:

1- to 32-character name

Default Value:

(No default)

TABLE (name)

(Required) Specify the name of the existing occurrence.

Valid Entries:

1- to 32-character name

Default Value:

(No default)

(status)

(Required) Specify the status of the existing occurrence.

Valid Entries:

T001—T999

Default Value:

(No default)

(pswd)

(Optional) Specify a password to protect this occurrence from unauthorized updates. For more information, see the section about protecting definitions in the CA Datacom Datadictionary User Guide.

Valid Entries:

1 to 4 alphanumeric characters

Default Value:

(No default)

(lock)

(Optional) Specify a lock level to restrict access to this occurrence. See the section on protecting definitions in the CA Datacom Datadictionary User Guide.

Valid Entries:

0, 1, or 2

Default Value:

0

LIKE (name)

(Optional) Specify the name of an existing ELEMENT occurrence in the same status to use as the model for the occurrence you are adding. When you use the LIKE option with an ELEMENT occurrence, the FIELD occurrences associated with the ELEMENT are not carried forward.

Note: Any aliases or descriptors assigned to the existing occurrence are not duplicated for the new occurrence. Define these separately.

Valid Entries:

1- to 32-character name

Default Value:

(No default)

When you press Enter, the ELEMENT definition panel appears. Define FIELD occurrences to the TABLE before they can appear on this definition panel. The definition panel can be used to define fields as components of an element in either of two methods: