set()
Assign a value to a variable.
Syntax
Parameter
Parameter | Definition |
---|---|
variable | name of a variable in the PATROL Agent object hierarchy to which value is assigned The variable parameter is validated using the following rules:
|
value | numeric or string value that is assigned to variable |
epochtime | numeric value that "timestamps" the value being set This value is optional. |
Description
The set() function sets the value of variable to be value. If variable is a relative name and does not exist in the context of the PSL script, the set() function successively searches each ancestor's context until variable is found or until the search fails in the context of the computer.
The set() function always returns the NULL string. However, if the variable parameter is not valid, the PSL run-time error532, "Badly formed object name." is generated.
The set() function can take an optional third argument, epochtime. This argument timestamps the value being set and only has meaning when setting a parameter value. For example, the following code will set the parameter value for a period one hour in the past:
Example
The following PSL statement sets the value of RDB database Dev parameter MyParam to 10.