Previous Topic: In Interactive SQL Service FacilityNext Topic: DEFINE


CREATE

Use the CREATE function to define an occurrence that is the root of a structure. This function is valid for the following:

A dataview is comprised of elements or keys. Define keys to the dataview if it is used for record at a time processing. For more information about how DL uses dataviews, see the Online COBOL/DL User Guide and the COBOL/DL Language Reference.

Dataviews used by CA Ideal are comprised of elements. You can include keys in the dataview definition, but CA Ideal ignores the keys when accessing data. You cannot use a CA Ideal/PDL reserved word as the name of a DATAVIEW occurrence. For more information, see the reserved word list in the CA Ideal Application Development Reference Guide.

Use the following format for this command:

Note: If your completed command exceeds the 76 spaces available in one command line, use the prompter panel to issue the command.

►►─┬─ CREATE ─┬─ entity ─ occ-name ─┬─ STATUS xxxx ─┬─────────────────────────►
   └─ CRE ────┘                     └─ STA xxxx ────┘

 ►─┬─────────────────┬─┬──────────┬─┬───────────────────┬─────────────────────►
   ├─ PASSWORD xxxx ─┤ ├─ LOCK n ─┤ └─ LIKE ─ occ-name ─┘
   └─ PSWD xxxx ─────┘ └─ LOC n ──┘

 ►─┬──────────────────────────┬───────────────────────────────────────────────►◄
   └─┬─ ACCESSING ─┬─ entity ─┘
     └─ ACC ───────┘
entity

(Required) Specify the entity for the occurrence you are creating.

Valid Entries in DBMAINT Mode:

DATABASE|BAS DATAVIEW|DVW

Valid Entries in FILEMAINT Mode:

FILE|FIL DATAVIEW|DVW

Default Value:

(No default)

occ-name

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

Valid Entries:

1- to 32-character name

Default Value:

(No default)

STA xxxx

(Required) Specify the status for the new occurrence.

Valid Entries:

T001—T999

Default Value:

(No default)

PSWD xxxx

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

Valid Entries:

1 to 4 alphanumeric characters

Default Value:

(No default)

LOC n

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

Valid Entries:

0, 1, 2

LIKE occ-name

(Optional) Specify the name of an existing occurrence in the same status as this entity to use as a model for this occurrence.

If the occurrence is related to a structure outside the CA Datacom/DB Model or the CA FILE Model, the relationship cannot be carried forward when you use this keyword. For more information about adding and maintaining relationship definitions, see the person responsible for CA Datacom Datadictionary administration at your site or see the CA Datacom Datadictionary User Guide.

Valid Entries:

An existing occurrence name

Default Value:

(No default)

ACC entity

For DATAVIEW occurrences only - Optional. Specify the entity of the occurrence to be related to the DATAVIEW. If you are relating KEY substructures to the DATAVIEW, specify KEYS. You can omit these keywords if you are relating ELEMENT substructures, the default value, to the DATAVIEW.

Valid Entries:

ELEMENTS or KEYS

Default Value:

ELEMENTS

When you press Enter, you receive the attribute panel for the occurrence where you specify the attribute-values. For more information about the attributes, valid entries, and default values for the entities in the CA Datacom/DB Model and CA FILE Model structures, see DBMAINT Mode - DATACOM/DB Structure Maintenance and :FILEMAINT Mode - File Structure Maintenance.