Set Attribute
Use this command to modify or set the access, default value, description, name, and value of an Attribute.
An Attribute is data used to describe the characteristics of an object. For example, SWFAdminEmail is an Attribute representing the email address of an Administrator. Attributes may be referenced as variables, and their value retrieved for one or a series of symbols.
This command must be used in conjunction with Maintenance. While it is enabled, no other users can perform maintenance related activities in the Data Server repository. When you are finished, you must remember to disable the Maintenance mode, and thereby allow normal access by other users. For more information, see Maintenance or Exclusive.
Syntax regular
SET ATTRIBUTE AttrClass AttrName DEFAULT TO "DefaultValue"
SET ATTRIBUTE AttrClass AttrName DESCRIPTION LanguageCode TO "String"
SET ATTRIBUTE AttrClass OldAttrName NAME TO NewAttrName
SET ATTRIBUTE AttrClass AttrName VALUE AttrObject "AttrValue"
SET ATTRIBUTE AttrClass AttrName ACCESS TO AccessType
where:
- AttrClass is the Attribute class and AttrObject is the Attribute object. Select from the following:
AttrClass Description SYSTEM
Describes the entire system at the highest level. Attributes of this Attribute class specify system-wide characteristics. There is only one object in the SYSTEM Attribute class: DBDEFAULT.
USER
Describes the Attributes of a particular user. Each user is an object in the USER Attribute class.
SYMBOL
Describes the characteristics of individual symbols. Each symbol is an object in the SYMBOL Attribute class.
- AttrName is the Attribute name.
- "DefaultValue" is the default value for the Attribute, enclosed in double quotation marks.
- LanguageCode is the two letter language code for the Attribute description.
- "String" is a character string to be used as a description of the Attribute, enclosed in double quotation marks.
- OldAttrName is the existing name of the Attribute.
- NewAttrName is the new name for the Attribute. Because Attribute names can be confusing, Longview uses strict naming conventions for creating Attributes. For more information, see the Longview Application Administrator Guide.
- AttrObject is the Attribute object.
- "AttrValue" is the value of the Attribute, enclosed in double quotation marks.
- AccessType sets the user’s read/write access. Select one of the following:
Value Description READ
Read-only access, to allow the user to read the data but not change it. This is the default.
WRITE
Write access, to allow the user to change data. This can be set only for User Attributes.
Note: For USER Attributes, the user can be authorized to both view and change an Attribute. For SYMBOL and SYSTEM Attributes, the user can only be authorized to view an Attribute.
Syntax example
MAINTENANCE ON
SET ATTRIBUTE SYMBOL AZCREDACCT DEFAULT TO "TrialBal"
MAINTENANCE OFF
Creating an ASCII input file
To set a large number of Attributes, specify the parameters for this command in an ASCII file.
Create an ASCII file containing the following information:
AttrClass{AttrName{DEFAULT{TO{DefaultValue
AttrClass{AttrName{DESCRIPTION{LanguageCode{TO{DefaultValue
AttrClass{AttrName{NAME{TO{AttrNewName
AttrClass{AttrName{VALUE{AttrObject{AttrValue
AttrClass{AttrName{ACCESS{TO{AccessType
where:
- FileName is an ASCII file containing the data. It can include a complete or partial folder path in the format C:\...\FileName. If FileName includes spaces, enclose it in double quotation marks; for example:
@"C:\My Documents\My Data.txt"
Note: If the document is in the same location as lv_af.exe, you do not need to specify the drive or path.