User-defined statements are used to directly establish user-defined entities in the dictionary. Optional clauses relate user-defined entities to other user-defined entities and to classes and attributes.
User-defined entities are established as classes by using the CLASS TYPE IS ENTITY clause of the CLASS statement. Statements for establishing and maintaining occurrences of user-defined entity types are similar to the ADD and MODIFY ATTRIBUTE statements. Once established, user-defined entities can be referenced by using any syntax that applies to classes and attributes.
If the SET OPTIONS statement specifies SECURITY FOR CLASS AND ATTRIBUTE IS ON, the user must be assigned the proper authority to issue user-defined entity statements.USER-DEFINED ENTITY.
Syntax
USER-DEFINED ENTITY statement
►►─┬─ ADD ─────┬─ user-defined-entity-type name is entity-occurrence-name ────►
├─ MODify ──┤
├─ REPlace ─┤
└─ DELete ──┘
►─┬─────────────────────────────────────────────────────────┬────────────────►
└─┬─ PREpared ─┬─ by user-id ──┬────────────────────────┬─┘
└─ REVised ──┘ └─ PASsword is password ─┘
►─┬────────────────────────────────┬─────────────────────────────────────────►
└─ NEW name is new-entity-name ──┘
►─┬────────────────────────────────┬─────────────────────────────────────────►
└─ deletion LOCk is ─┬─ OFF ◄ ─┬─┘
└─ ON ────┘
┌─────────────────────────────────────────────────────────────────┐
►─▼─┬─────────────────────────────────────────────────────────────┬─┴────────►
└─┬─ INClude ◄ ─┬─ USEr is user-id ──┬──────────────────────┬─┘
└─ EXClude ───┘ └─ user-specification ─┘
(for complete user-specification syntax, see USER clause)
►─┬──────────────────────────────────────────────────────┬───────────────────►
└─ PUBlic access is ─┬───────────┬─ for ─┬─ ALL ◄ ───┬─┘
└─ ALLOwed ─┘ ├─ NONe ────┤
├─ UPDate ──┤
├─ MODify ──┤
├─ REPlace ─┤
├─ DELete ──┤
└─ DISplay ─┘
┌───────────────────────────────────────────────────────────────────────┐
►─▼─┬───────────────────────────────────────────────────────────────────┬─┴──►
└─┬ INClude ◄ ┬ class-name is attribute-name ┬────────────────────┬─┘
└ EXClude ──┘ └ TEXt is user-text ─┘
┌──────────────────────────────────────────────────────────────────────────
►─▼─┬────────────────────────────────────────────────────────────────────────►─
└─┬─ INClude ◄ ─┬─ relational-key is ─┬─────────────┬─ attribute-name ───
└─ EXClude ───┘ └─ ATTribute ─┘
─────────────────────────────────────────────────────────┐
─►───────────────────────────────────────────────────────┬─┴──────────────────►
─┬───────────────────────────┬─┬─────────────────────┬─┘
└─ WITHIn class class-name ─┘ └─ TEXt is user-text ─┘
┌─────────────────────────────────────────────────────────────────────────
►─▼─┬────────────────────────────────────────────────────────────────────────►─
└┬─ INClude ◄ ─┬─ relational-key is class-name is attribute-name ────────
└─ EXClude ───┘
───────────────────────────┐
─►─────────────────────────┬─┴────────────────────────────────────────────────►
─┬─────────────────────┬─┘
└─ TEXt is user-text ─┘
┌──────────────────────────────────────────────────────────────────────────
►─▼─┬────────────────────────────────────────────────────────────────────────►─
└─┬─ INClude ◄ ─┬─ entity-type-name is entity-occurrence-name ───────────
└─ EXClude ───┘
──────────────────────────────────────────────────────────────────┐
─►────────────────────────────────────────────────────────────────┬─┴─────────►
─┬───────────────────────────────────┬─┬──────────────────────┬─┘
└─ Version is ─┬─ version-number ─┬─┘ └─ TEXt is user-text ──┘
├─ HIGhest ────────┤
└─ LOWest ─────────┘
┌───────────────────────────────────────────────────────────────┐
►─▼─┬───────────────────────────────────────────────────────────┬─┴──────────►
│ ┌────────────────────┐ │
└─ EDIt ─┬─ COMments ────┬───▼─ edit-instruction ─┴─ QUIT ──┘
├─ DEFinition ──┤
└─ comment-key ─┘
┌──────────────────────────────────────────────────┐
►─▼─┬─────────────────────────────────────────────┬──┴───────────────────────►◄
└─┬─ COMments ─────┬── is ─┬─ NULl ─────────┬─┘
├─ DEFinition ───┤ └─ comment-text ─┘
└─ comment-key ──┘
DISPLAY/PUNCH user-defined entity (for a single entity)
►►─┬─ DISplay ─┬─ user-defined-entity-type name is entity-occurrence-name ────►
└─ PUNch ───┘
►─┬──────────────────────────────────────────────────┬───────────────────────►
└─ PREpared by user-id ─┬────────────────────────┬─┘
└─ PASsword is password ─┘
┌─────────────────────────────────────────────────────────┐
►─▼─┬─────────────────────────────────────────────────────┬─┴────────────────►
│ ┌──────────────────────────────────┐ │
├─ WITh ──────┬──▼──┬─ ALL ───────────────────────┬─┴─┘
├─ ALSo WITh ─┤ ├─ ALL COMment TYPes ─────────┤
└─ WITHOut ───┘ ├─ ATTributes ────────────────┤
├─ COMments ──────────────────┤
├─ DEFinitions ───────────────┤
├─ DEStinations ──────────────┤
├─ DETails ───────────────────┤
├─ ELements ──────────────────┤
├─ ENTRy points ──────────────┤
├─ FILes ─────────────────────┤
├─ HIStory ───────────────────┤
├─ LINes ─────────────────────┤
├─ LOGical-terminals ─────────┤
├─ MAPS ──────────────────────┤
├─ MODules ─┬─────────┬───────┤
│ └─ ONLy ──┘ │
├─ NONE ──────────────────────┤
├─┬─ PANels ──┬───────────────┤
│ └─ SCReens ─┘ │
├─ PHYsical-terminals ────────┤
├─ PROCesses ─────────────────┤
├─ PROgrams ──────────────────┤
├─ QFIles ────────────────────┤
├─ QUEues ────────────────────┤
├─ RECords ───────────────────┤
├─ REPorts ───────────────────┤
├─┬─ SYStems ────┬────────────┤
│ └─ SUBSYstems ─┘ │
├─ TABles ────────────────────┤
├─ TASks ─────────────────────┤
├─ TRAnsactions ──────────────┤
├─ USErs ─────────────────────┤
├─┬─ USEr DEFINED COMments ─┬─┤
│ └─ UDCs ──────────────────┘ │
├─┬─ USEr DEFINED NESts ─┬────┤
│ └─ UDNs ───────────────┘ │
└─ WHEre USED ────────────────┘
►─┬──────────────────────────────────────────────────────────────────────────►─
└─ 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 user-defined entity (for multiple entities)
►►─┬─ DISplay ┬─┬ ALL ─────────────────────┬ user-defined-entity-type ────────►
└─ 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 user-defined entity to be established in the dictionary, or an existing user-defined entity to be modified, replaced, deleted, displayed, or punched. User-defined-entity-type must be the 1- through 20-character name of a class defined with the CLASS TYPE IS ENTITY option.
Entity-occurrence-name must be a unique 1- through 40-character name within user-defined entity-type-name.
Specifies a new name for the requested user-defined entity. New-entity-name must conform to the rules for entity-occurrence-name presented above. This clause changes only the name of the named entity;
it does not alter or delete any previously defined relationships in which the entity participates. Subsequent references to the entity must specify the new name. Note that the user-defined entity occurrence cannot be
renamed if DELETION LOCK IS ON (described below) is specified.
Enables or disables the entity deletion lock.
Disables the deletion lock; the user can delete or rename the entity occurrence directly. OFF is the default.
Enables the deletion lock; the user cannot delete or rename the entity. If DELETION LOCK IS ON is specified, MODIFY user-defined-entity DELETION LOCK IS OFF must be specified to delete or rename the
requested entity occurrence.
Associates the named entity with another entity through a previously defined relational key. The optional keyword ATTRIBUTE must be specified if the named class is defined with the same name as the attribute.
Uniquely identifies an established attribute. This parameter must be specified if the named attribute does not uniquely identify an established attribute. Class-name must match the name of a previously defined class.
Associates an occurrence of a class with an occurrence of an attribute or user-defined entity through a previously defined relational key.
Associates (INCLUDE) the named entity occurrence with or disassociates (EXCLUDE) it from an occurrence of the specified entity type.
Includes or excludes the specified options when the user-defined entity is displayed or punched. Detailed information for each DISPLAY/PUNCH option is under 3.4.2, “SET OPTIONS Syntax” on page 39. The options that are listed below present special considerations for this entity type.
Includes the DELETION LOCK specification.
Includes all user-defined entities to which the named user-defined entity is related.
Example:
In the following example, the user-defined entity types DEPARTMENT and EMPLOYEE are established in the dictionary by means of the CLASS TYPE IS ENTITY clause of the CLASS statement.
DOCUMENTATION and JMP are added as occurrences of DEPARTMENT and EMPLOYEE, respectively. The employee's birth date and date of hire can be added by relating two occurrences of DATE to an occurrence of EMPLOYEE.
add class department class type is entity.
add class employee class type is entity.
add department documentation.
add employee jmp department documentation.
add class date attributes are automatic class type is entity.
modify entity attribute user defined nest is hire user defined nest is birth.
add employee tlm department is personnel birth date is 7/5/52 hire date is 2/2/82.
The MODIFY PROGRAM statement relates the predefined program PAYROLL to the user-defined entity occurrence EMPLOYEE TLM:
modify program payroll employee is tlm.
|
Copyright © 2014 CA.
All rights reserved.
|
|