CLASS statements are used to establish, maintain, replace, delete, display, and punch classes. Optional clauses are used to:
Syntax
CLASS Statement
►►─┬─ ADD ─────┬─ CLAss name is class-name ───────────────────────────────────► ├─ MODify ──┤ ├─ REPlace ─┤ └─ DELete ──┘ ►─┬─────────────────────────────────────────────────────────┬────────────────► └─┬─ PREpared ─┬─ by user-id ──┬────────────────────────┬─┘ └─ REVised ──┘ └─ PASsword is password ─┘ ►─┬──────────────────────────────┬───────────────────────────────────────────► └─ NEW NAMe is new-class-name ─┘ ►─┬───────────────────────────────┬──────────────────────────────────────────► └─ CLAss TYPe is ─┬─ CLAss ◄ ─┬─┘ └─ ENTIty ──┘ ►─┬────────────────────────────────────────────────────┬─────────────────────► └─ ATTributes are ─┬─ MANual ◄ ───┬──┬─ PLUral ◄ ──┬─┘ └─ AUTomatic ──┘ └─ SINgular ──┘ ►─┬────────────────────────────────┬─────────────────────────────────────────► └─ deletion LOCk is ─┬─ OFF ◄ ─┬─┘ └─ ON ────┘ ┌───────────────────────────────────────────────────────────────┐ ►─▼─┬───────────────────────────────────────────────────────────┬─┴──────────► │ ┌────────────────────┐ │ └─ EDIt ─┬─ COMments ────┬───▼─ edit-instruction ─┴─ QUIT ──┘ ├─ DEFinition ──┤ └─ comment-key ─┘ ┌──────────────────────────────────────────────────┐ ►─▼─┬─────────────────────────────────────────────┬──┴───────────────────────►◄ └─┬─ COMments ─────┬── is ─┬─ NULl ─────────┬─┘ ├─ DEFinition ───┤ └─ comment-text ─┘ └─ comment-key ──┘
DISPLAY/PUNCH CLASS Statement (for a single class)
►►─┬─ DISplay ─┬─ CLAss name is class-name ───────────────────────────────────► └─ PUNch ───┘ ►─┬───────────────────────────────────────────────────┬──────────────────────► └─ PREpared by user-id ─┬─────────────────────────┬─┘ └─ PASsword is password ──┘ ┌────────────────────────────────────────────────────────────┐ ►─▼─┬────────────────────────────────────────────────────────┬─┴─────────────► │ ┌──────────────────────────────────┐ │ └─┬─ WITh ──────┬──▼──┬─ ALL ───────────────────────┬─┴──┘ ├─ ALSo WITh ─┤ ├─ ALL COMment TYPes ─────────┤ └─ WITHOut ───┘ ├─ ATTributes ────────────────┤ ├─ COMments ──────────────────┤ ├─ DEFinitions ───────────────┤ ├─ DETails ───────────────────┤ ├─ HIStory ───────────────────┤ ├─ NONe ──────────────────────┤ ├─┬─ USEr DEFINED COMments ─┬─┤ │ └─ UDCs ──────────────────┘ │ └─┬─ USEr DEFINED NESts ─┬────┘ └─ UDNs ───────────────┘ ►─┬──────────────────────────────────────────────────────────────────────────►─ └─ TO ─┬─ SYSpch ────────────────────────────────────────────────────────── └─ MODule module-name ─┬───────────────────────────────────┬──────── └─ Version is ─┬─ version-number ─┬─┘ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ─►──────────────────────────────────────────────────────────────────────────┬─► ─────────────────────────────────────────────────────────────────────────┬┘ ─┬──────────────────────┬┬──────────────────────────────────────────────┬┘ └ LANguage is language ┘└ PREpared by user-id ┬───────────────────────┬┘ └ PASsword is password ─┘ ►─┬──────────────────────┬──┬─────────────────────┬──────────────────────────►◄ └─ VERB ─┬─ DISplay ─┬─┘ └─ AS ─┬─ SYNtax ───┬─┘ ├─ PUNch ───┤ └─ COMments ─┘ ├─ ADD ─────┤ ├─ MODify ──┤ ├─ REPlace ─┤ └─ DELete ──┘
DISPLAY/PUNCH CLASS Statement (for multiple classes)
►►─┬─ DISplay ─┬─┬─ ALL ──────────────────────────┬─ CLAsses ─────────────────► └─ PUNch ───┘ └─┬─ FIRst ─┬─┬─ 1 ◄ ──────────┬─┘ ├─ NEXt ──┤ └─ entity-count ─┘ ├─ LASt ──┤ └─ PRIor ─┘ ►─┬──────────────────────────────────────────────────┬───────────────────────► └─ PREpared by user-id ─┬────────────────────────┬─┘ └─ PASsword is password ─┘ ►─┬─────────────────────────────────┬────────────────────────────────────────► └─ WHEre conditional-expression ──┘ (for complete conditional-expression syntax, see WHERE clause) ►─┬──────────────────┬───────────────────────────────────────────────────────► └─ BY ─┬─ SET ◄ ─┬─┘ └─ AREa ──┘ ►─┬──────────────────────────────────────────────────────────────────────────►─ └─ TO ─┬─ SYSpch ────────────────────────────────────────────────────────── └─ MODule module-name ─┬───────────────────────────────────┬──────── └─ Version is ─┬─ version-number ─┬─┘ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ─►──────────────────────────────────────────────────────────────────────────┬─► ─────────────────────────────────────────────────────────────────────────┬┘ ─┬──────────────────────┬┬──────────────────────────────────────────────┬┘ └ LANguage is language ┘└ PREpared by user-id ┬───────────────────────┬┘ └ PASsword is password ─┘ ►─┬──────────────────────┬──┬──────────────────────────────────────┬─────────►◄ └─ VERB ─┬─ DISplay ─┬─┘ └─ AS ─┬─ SYNtax ───┬──┬─────────────┬─┘ ├─ PUNch ───┤ └─ COMments ─┘ └─ RECursive ─┘ ├─ ADD ─────┤ ├─ MODify ──┤ ├─ REPlace ─┤ └─ DELete ──┘
Parameters
Identifies a new class to be established in the dictionary or an existing class to be modified, replaced, deleted, displayed, or punched. Class-name must be a 1-through 20-character name that does not duplicate an existing class name.
Specifies a new name for the requested class. New-class-name must conform to the rules for class-name (described above). This clause changes only the name of the requested class; it does not alter or delete any previously defined attributes or attribute/entity relationships within the class. Subsequent references to the class must specify the new name. If DELETION LOCK IS ON is specified, the DDDL compiler will not process the NEW NAME clause.
Determines whether class is established as a class or as a user-defined entity type in the dictionary.
Class is established as a class in the dictionary. This is the default.
Class is established as a user-defined entity type in the dictionary. This option allows the user to define occurrences of the entity by using the user-defined entity statement as described under USER-DEFINED ENTITY later in this chapter.
Assigns qualifiers to attributes associated with the named class.
Specifies that attributes must be added to the dictionary explicitly by using the ADD ATTRIBUTE statement.
Specifies that attributes are added to the dictionary automatically when they are named in a class/attribute clause within an entity-type statement.
Specifies that multiple attributes can be related to an entity occurrence. PLURAL is the default.
Specifies that only one attribute can be related to an entity occurrence.
Controls the class deletion lock.
Permits the user to delete or rename the named class. OFF is the default. Even if DELETION LOCK IS OFF is specified, the predefined classes LANGUAGE and MODE cannot be deleted if any attributes exist within those classes.
Prohibits the user from deleting or renaming the named class. If DELETION LOCK IS ON is specified, a MODIFY CLASS statement specifying DELETION LOCK IS OFF must be processed before the named class can be deleted or renamed.
Includes or excludes the specified options when the named class is displayed or punched. Detailed information for each DISPLAY/PUNCH option is under SET OPTIONS Syntax. The option that is listed below presents special considerations for this entity type.
Includes the DELETION LOCK, ATTRIBUTES ARE, and CLASS TYPE specifications.
Usage
Considerations
The following considerations apply to using CLASS statements:
If you specify REPLACE
If you specify REPLACE, the DDDL compiler initializes to defaults and/or excludes the following option:
Attributes associated with the named class are not affected.
If you specify DELETE
If you specify DELETE, the DDDL compiler deletes the requested class and all attributes owned by that class, regardless of the delete locks on or the user authority for the attributes.
Examples
The following statement adds the class ENTITY-STATUS with the attribute qualifiers of manual and singular and sets the deletion lock on.
add class entity-status
prepared by dba password is 'ice 9'
deletion lock is on
attributes are manual singular.
The following statements add the class ENTITY-TYPE (by default, the class is assigned the manual and plural qualifiers and the deletion lock is turned off) and modify the class name and default attributes qualifier and deletion lock specifications.
add class entity-type
prepared by dba password is 'ice 9'.
modify class entity-type
revised by dba password is 'ice 9'
new name is occurrence-type
deletion lock is on
attributes are singular.
The following statement adds the class COURSE and assigns it a class type of ENTITY and the automatic and plural qualifiers.
add class course
prepared by dba password is 'ice 9'
class type is entity
attributes are automatic plural.
|
Copyright © 2014 CA.
All rights reserved.
|
|