SDModifyAttr [ HP System Dictionary XL Intrinsics ] MPE/iX 5.0 Documentation
HP System Dictionary XL Intrinsics
SDModifyAttr
Modifies an attribute in the dictionary structure.
Syntax
SDModifyAttr (Dcb,Attribute,NewAttributeName,NewAttributeParms,
NewAttributeEdits,EditsLength,NewOwnerScope,Status)
Parameters
Dcb Required input; type = DcbType
This parameter passes information about the
dictionary to this intrinsic. It is
initialized by the SDOpen intrinsic.
Attribute Required input; type = NameOrNumberType
This parameter specifies the attribute to be
modified.
NewAttributeName Required input; type = NameType
This parameter specifies the new external name
for the attribute. A blank string indicates no
name change to the attribute.
NewAttributeParms Required input; type = AttributeDescriptionType
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 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)
The attribute type cannot be changed, and must
be zero. Any change in attribute length must
be valid for the current attribute type. To
indicate no change in the attribute parameter,
set both the attribute type and length to zero.
NewAttributeEdits Required input; type = AttributeEditsType
This parameter specifies the new edits to be
placed on occurrence attribute values. The
first edit in the list will be used as the
default attribute value. Default edit values
are explained in Chapter 3 of Volume 1 of the
HP System Dictionary/XL General Reference
Manual (32256-90004). 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. 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
NewAttributeEdits parameter, and must not
exceed 255. To indicate no change to existing
attribute edits, set the value of this
parameter to zero. To delete existing
attribute edits, set the value to -1.
NewOwnerScope Required input; type = NameOrNumberType
This parameter specifies the new owner scope.
A blank string passed for this parameter
indicates no change in owner scope.
Status Output; type = StatusType
This parameter contains information indicating
the success or failure of the intrinsic call.
This information is detailed in Table Table
3-1, located in Chapter 3 of this manual.
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 the attribute's owner scope.
3. Core set attributes cannot be modified, except for external names
and attribute edits. These can be modified only by the Dictionary
Administrator.
4. Only the external name will be changed, even if the current name
mode is internal. Internal names are fixed, and used for
reference only.
5. If an attribute's byte length is shortened, the length of its
existing edits will be automatically shortened to match the new
attribute length. Conversely, when an attribute's length is
increased, all its edit lengths will be padded to match the new
length.
6. An edit length may not be longer than 255 bytes.
7. Edit ranges must be specified correctly. See the explanation for
the parameter NewAttributeEdits.
MPE/iX 5.0 Documentation