int kdms_define_attribute(
char *association,
char *attribute,
int numargs,
int argsize,
int datatype,
int permanent,
int shared,
kvalist)
value1 [, value2, ...]
The list should consist of "numarg" arguments, where each argument is of "argsize" size of "datatype" data type.
none
The attribute definition is distinguished by the given attribute name. The name must be a string, unique for the given association. The attribute acts as storage for multiple argument values. Each attribute argument can be of any size (> 0) or data type. The number of arguments, the argument size, and the data type are all specified in this definition.
Attributes can be permanent, implying that they are stored to the disk when the object is closed. Technically, a permanent attribute will only be stored if the underlying file format has the capacity for storing it. See the man page for kdatafmt for more information of file formats.
Attributes can be either created on the main object (object-level) or created on any of the object's data segments (segment-level). Whether an attribute is created at the object-level or at the segment-level is determined by the attribute definition's association.
The provided association is simply a string. A NULL association indicates that the attribute can only be created at the object-level. An association of KDMS_ALL_SEGMENTS indicates that the attribute can be created at the segment level on any segment name. If a specific segment name, such as "value" is given for the association, then the attribute can only created on the "value" segment.
The attribute can be either permanent or transient. Permanent impiles that when the object is closed, a representation of the attribute will be written out to the disk. Note that this representation completely describes the attribute, and it will be possible to read this attribute later in another session even if it has not been defined there.
In addition to being created either at the object or segment level, an attribute can also be created at the physical or presentation level.
Changes to physical level attributes are visible to all references of the data object and are termed as "shared" attributes. Changes to presentation level attributes are visible only to the reference object on which the change was made, and thus the attribute is termed as "unshared". Since all references may have potentially different values, unshared attributes may not be permanent.
A default must be provided. This default must consist of the proper number of arguments where each argument is of the same size and data type specified in the definition. This default will be used when initializing any attributes created from this definition.
This attribute can be undefined with the kdms_undefine_attribute call.
none
none
$DATASERV/objects/library/kdataman/src/attributes.c