CREATE ENTITY [ HP SYSTEM DICTIONARY XL SDMAIN ] MPE/iX 5.0 Documentation
HP SYSTEM DICTIONARY XL SDMAIN
CREATE ENTITY
Creates a new entity.
Syntax
C[REATE] E[NTITY] entity-name
;E[NTITY-]T[YPE] = entity-type-name
[;INT[ERNAL] = internal-name]
[;A[TTRIBUTE-]L[IST]=([ attribute-name1=[attribute-value1]]
[,attribute-name2=[attribute-value2]]
.
.
.
[,attribute-nameN=[attribute-valueN]])]
[;C[OMMON] = common-entity-name]
.
Parameters
entity-name External name of the entity to be created.
entity-type-name Name of the type of the entity to be created.
internal-name Internal name of the entity to be created. If not
specified, the internal name is the same as the
entity-name.
attribute-name(N) Name of the attribute to be assigned a value.
attribute-value(N) The value to be assigned to the attribute. If the
attribute is a variable length attribute, you must
specify the value text within quotes. Also, if the
attribute is of type alias or character, and the
attribute value includes invalid characters (See
"User-Defined Names" in Chapter 3) or is greater
than 32 characters in length, you must specify the
attribute value within quotes.
common-entity-name Name of the entity in the common domain whose
attributes are to be shared by the local domain
entity being created. This keyword is not allowed
if the dictionary is open in the common domain. If
you specify this parameter, then the attribute list
can contain only the following attributes:
sensitivity Specifies the access rights to the
entity
id-number A user-specified identification
number that is never checked for
uniqueness by System Dictionary
If you specify attributes other than these in the
attribute list, then you must not use this
parameter.
Description
System Dictionary automatically assigns values for the following
attributes:
scope-owner
date-created
date-changed
scope-changed
If you do not specify the attribute name, or if you specify the name but
do not assign a value, the default value from the attribute's edit values
is used. If the attribute does not have any edit values, then the System
Dictionary default value for the attribute's data type is used.
alias : No alias is assigned
boolean : FALSE
character : ASCII blanks
floating : Floating point zero
integer : Binary zero
variable : No value is assigned
If the attribute is of type boolean the only values allowed are true and
false (may be abbreviated T and F, respectively).
The valid values for the sensitivity attribute are:
private Only the owner scope is allowed access to the entity,
unless it assigns access to other scopes by associating the
entity to the scope by means of the ADD SCOPE-ENTITY
command. This is the default.
read Any scope with read capability may read the entity. The
owner scope may, in addition, assign modify access to other
scopes by associating the entity to the scope by means of
the ADD SCOPE-ENTITY command.
modify Any scope with read capability may read the entity. Any
scope with create capability may read and modify the
entity.
You should only specify the attributes sensitivity and id-number for the
first version of an entity to be created. If you do not specify
sensitivity for the first version of an entity, it defaults to private.
If you specify sensitivity or id-number for subsequent versions of an
entity, they are ignored. If the entity is to be linked to an entity in
the common domain, the sensitivity cannot be greater than the sensitivity
of the entity in the common domain.
To link the entity to an entity in the common domain, the current version
must be linked to a version in the common domain.
Open Mode: Shared-update or exclusive-update
Scope: DA scope or any scope with create capability. The scope
with which the dictionary is open is the owner of the
entity.
Example
The following example creates the element %account with element-type of 9
and byte-length of 8. In addition, it has the cobol-alias ACCT-NO and a
description.
>CREATE ENTITY %account;
>>ENTITY-TYPE = element;
>>ATTRIBUTE-LIST = (element-type = 9, byte-length = 8,
>>cobol-alias = ACCT-NO,
>>description = "Each customer has a unique account no.
>>All of the customers' transactions are sorted by
>>date and product number.").
>
MPE/iX 5.0 Documentation