Visara Master Console Center Scripting Guide Instrukcja Użytkownika Strona 158

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 262
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 157
Chapter 5 Script Commands
Scripting Guide 158
OBJSET
Syntax:
OBJSET( %ObjID, $ObjFieldName, $NewValue) ==> %ErrCode
Description:
Sets the current value in an object’s field.
Action:
The field specified by ObjFieldName for the object specified by ObjID is
set to the value specified by the NewValue parameter.
Parameters:
%ObjID. Numeric expression. The object ID assigned to the object for
which to set the value. Refer to the description of Object ID on page 26
for more information.
%ObjFieldName. String expression. The field name in the object to
get the value from. Refer to Object Field on page 26 for more
information.
$NewValue. String expression. The value to set the specified field to.
A target of an integer field will have its value automatically converted
from the string value to a numeric value in the same manner as the
VAL() command.
Returns:
A numeric value indicating the status of the operation, as follows:
Manifest Constant Description
ERR_NONE No error
ERROR Error
If an error occurred, the ERRORNUM() function returns one of the
following values:
Manifest Constant Description
Err_None No error has occurred. The correct
value for the object’s field is the empty
string.
Err_BadArgs %Class is not a supported class type.
Err_Obj_InvalidId %ObjIDParent does not contain a valid
object id.
Notes:
1. Refer to the description of the STR() command for string to
numeric conversions.
2. When setting more than 25% the fields of an object,
OBJSETARRAY() is more efficient than OBJSET().
Example:
//This example sets the desired status of the Cron
// task ( running on the Solaris OS, running on the
// Webserv CPU ) to down.
$CronExpr := “WEBSERV:SOLARIS:CRON”
%CronID := OBJID( SW, $CronExpr)
$Desired_fieldname := “Desired_status”
$New_Desired_value := “down”
%ErrCode := OBJSET( %CronID, $Desired_fieldname,
$New_Desired_value)
See Also:
OBJEXEC, OBJGET, OBJGETARRAY, OBJID, OBJIDARRAY,
OBJSETARRAY
Przeglądanie stron 157
1 2 ... 153 154 155 156 157 158 159 160 161 162 163 ... 261 262

Komentarze do niniejszej Instrukcji

Brak uwag