MODIFY ATTRIBUTE [ HP SYSTEM DICTIONARY XL SDMAIN ] MPE/iX 5.0 Documentation
HP SYSTEM DICTIONARY XL SDMAIN
MODIFY ATTRIBUTE
Modifies an attribute.
Syntax
M[ODIFY] A[TTRIBUTE] attribute-name
[;S[COPE-]O[WNER] = scope-owner-name]
[;LEN[GTH] = attribute-length]
[;E[DIT-]V[ALUE] = [ attr-edit-value1
[,attr-edit-value2]
.
.
.
[,attr-edit-valueN]]]
.
Parameters
attribute-name Name of the attribute to be modified
scope-owner-name Name of the new owner scope
attribute-length Length of the attribute. You cannot modify the
length if the data type is alias, boolean, or
variable. For the remaining data types, character,
floating, and integer, the following length ranges
are permissible:
Data Type Length
character 1 to 255
floating 4 or 8
integer 2 or 4
attr-edit-value(N) The new edit values for the attribute. The first
value you specify is the default value used
whenever you specify an occurrence using this
attribute and you 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 specified during CREATE
ENTITY, CREATE RELATIONSHIP, MODIFY ENTITY, and
MODIFY RELATIONSHIP commands must match one of the
values specified here. If the value entered
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.) If the type is
either floating or integer, any single number or a
number range of the form "number : number" is
allowed (if you specify a range as the first entry
in the list, the first number of the range is the
default).
To remove all edit values from an attribute,
specify the EDIT-VALUE keyword with no edit values.
In order to leave attribute edit values unchanged,
issue the MODIFY ATTRIBUTE command without the
EDIT-VALUE clause.
Description
If you change the edit value of the attribute, there is no check to make
sure that any existing values of that attribute meet the new criteria.
Accordingly, if you add or change an edit value to be more restrictive,
it is your responsibility to check to make sure that all existing values
of the attribute are updated as needed.
Changing the length of the attribute requires modification of all
attribute values associated with that attribute. This operation (done at
restructuring time) may take some time if there are many values for this
attribute. If lengths are expanded, the current value is fit into the
larger space; if lengths are reduced, the following occurs:
* Character strings are truncated to the new length
* Integers between - 32768 and 32767 remain the same. Positive
integers that are larger than 32767 are set 32767. Negative integers
that are less than -32768 are set to -32768.
* Floating point numbers will have the number of significant digits
reduced from 16 to 6.
Open Mode: Customization
Scope: DA scope or the attribute's owner scope
Example
In the following example, the attribute length for attribute
terminal-type is changed to 26 and the edit-value is changed to be a
default value of TTY with no editing (the owner scope remains unchanged).
>MODIFY ATTRIBUTE terminal-type;
>>LENGTH = 26;
>>EDIT-VALUE = TTY.
>
MPE/iX 5.0 Documentation