HP 3000 Manuals

SDCreateAttr [ HP System Dictionary XL Intrinsics ] MPE/iX 5.0 Documentation


HP System Dictionary XL Intrinsics

SDCreateAttr 

Creates a new attribute in the dictionary structure.

Syntax 

     SDCreateAttr (Dcb,NewAttribute,AttributeParms,AttributeEdits,
                   EditsLength,Status)

Parameters 

Dcb                 Required input; type = DcbType 
                    This parameter passes information about the
                    dictionary to this intrinsic.  It is initialized by
                    the SDOpen intrinsic.

NewAttribute        Required input; type = NewNameType 
                    This parameter specifies the name of the attribute to
                    be created.

AttributeParms      Required input; type = AttributeDescription 
                    This parameter describes the attribute.  It has two
                    elements.  The first element specifies the
                    attribute's data type (1 thru 6), and the second
                    element (shown in parentheses) specifies the
                    attribute's byte length.

                    1 = Alias Name            (always 32)
                    2 = Boolean               (always 1)
                    3 = Character             (1 thru 255)
                    4 = Floating Point        (4 or 8)

                    5 = Integer               (2 or 4)

                    6 = Variable Character    (always 0)

AttributeEdits      Required input; type = AttributeEditsType 
                    This parameter specifies the edits to be placed on
                    occurrence attribute values.  The first edit in the
                    list will be used as the default attribute value.  If
                    only one edit value exists, it will be considered a
                    default, and not an edit.  Edits may be specified for
                    attributes of the following data types only:
                      2 = Boolean
                      3 = Character
                      4 = Floating Point
                      5 = Integer

                    Edits must be specified according to the attribute's
                    data type, as follows:

                      Boolean :  True or false (use to set default value)

                      Character :  A list of character edit values.  Each
                      edit must be the same byte length as the attribute
                      being edited (specified in the AttributeParms 
                      parameter).  The first edit value in the list will
                      be the default attribute value.

                      Integer or Floating Point :  These are lists of
                      number pairs, each pair indicating a range of valid
                      values.  Each number specified must be the same
                      type and byte length as the attribute being edited.
                      The first number in the pair must be less than or
                      equal to the second number in the pair.  The first
                      number of the first pair will be the default
                      attribute value.

EditsLength         Required input by value; type = 4 byte Integer 
                    This parameter specifies the byte length of the
                    AttributeEdits parameter, and must not exceed 255.

Status              Output; type = StatusType 
                    This parameter contains information indicating the
                    success or failure of the intrinsic call.  This
                    information is detailed in Table 3-1.

                    If this intrinsic is successful, the Status parameter
                    contains the following information, in addition to
                    the description contained in Table 3-1.

-------------------------------------------------
|          |                                    |
|  Bytes   |              Contain               |
|          |                                    |
-------------------------------------------------
|          |                                    |
| 17 - 20  | Internal attribute number          |
|          |                                    |
-------------------------------------------------

Discussion 

The following restrictions apply when using this intrinsic:

   1.  Open mode--The dictionary must be opened in Exclusive 
       Customization mode.

   2.  Security--The current scope must be either the Dictionary
       Administrator scope or a scope with Extend capability.

   3.  Maximum Quantities--the maximum number of attributes allowed is
       1024.  The maximum number of alias name attributes is 128.  The
       maximum edit length is 255 bytes.

   4.  Edit ranges must be specified correctly.  See the explanation for
       the parameter AttributeEdits.

       _________________________________________________________________ 

       NOTE  In the future, Hewlett Packard will prefix all names of
             objects it adds to the core set with "HP".  To avoid
             potential name conflicts, do not create any entity types,
             relationship classes, attributes, scopes, domains, or
             versions prefixed with "HP".

       _________________________________________________________________ 


MPE/iX 5.0 Documentation