HP 3000 Manuals

CREATE ATTRIBUTE [ HP SYSTEM DICTIONARY XL SDMAIN ] MPE/iX 5.0 Documentation


HP SYSTEM DICTIONARY XL SDMAIN

CREATE ATTRIBUTE 

Creates a new attribute.

Syntax 

     C[REATE] A[TTRIBUTE] attribute-name 
            [;INT[ERNAL] = internal-name]
             ;T[YPE] = attribute-data-type 
            [;LEN[GTH] = attribute-length]
            [;E[DIT-]V[ALUE] = attr-edit-value1 
                             [,attr-edit-value2]
                                       .
                                       .
                                       .
                             [,attr-edit-valueN]]
                             .

Parameters 

attribute-name        External name of the attribute to be created.

internal-name         Internal name of the attribute to be created.  If
                      not specified, the internal name is the same as the
                      attribute-name.

attribute-data-type   The attribute data type.  Valid data types are:

                           alias
                           boolean
                           character
                           floating
                           integer
                           variable

attribute-length      Length of the attribute.  Legal values are:

                           Data Type          Length

                           alias                32
                           boolean              1
                           character            1 - 255
                           floating             4 or 8
                           integer              2 or 4
                           variable             0 (undefined)

                      If the attribute-data-type is a character,
                      floating, or integer, the length is required.
                      Otherwise, this clause is optional and the length
                      is set at the only possible value.

attr-edit-value(N)    The edit values for the attribute.  The first value
                      you specify is the default value used whenever you
                      specify an occurrence using this attribute and do
                      not provide a value.  If there is only one value,
                      it is only a default and no edit check is
                      performed.  However, if there is more than one
                      value, the values you specify during CREATE ENTITY,
                      CREATE RELATIONSHIP, MODIFY ENTITY, and MODIFY
                      RELATIONSHIP commands must match one of the values
                      specified here.  If the value you specify through
                      one of these commands is not one of the edit
                      values, an error is returned.  Edit values are not
                      allowed for data types alias and variable.

                      The edit values are a list of values separated by
                      commas.  If the type is boolean, only the values
                      true and false are allowed.  If the type is
                      character, any character string less than or equal
                      to the length is allowed.  (If you use any
                      character not allowed in a user-defined name, you
                      must enclose the value in quotes.)  Finally, if the
                      type is either floating or integer, any single
                      number or a number range of the form "number :
                      number" is allowed as an entry in the list.  If you
                      specify a range as the first entry in the list, the
                      first number of the range is the default.

Description 

To avoid possible name conflicts with any future extensions to the core
set, do not create any attributes with a name starting with the
characters "HP" .

Open Mode:       Customization

Scope:           DA scope or any scope with extend capability.  The scope
                 with which the dictionary is open is the owner of the
                 attribute.

Example 

The following example creates the attribute terminal-type of data type
character, with a length of 30.  Only the values TTY and GRAPHICS are
allowed as values for the attribute with TTY as the default.

     >CREATE ATTRIBUTE terminal-type; 
     >>TYPE = character; 
     >>LENGTH = 30; 
     >>EDIT-VALUE = TTY, GRAPHICS. 
     >


MPE/iX 5.0 Documentation