Top
Systemwalker Operation Manager V17.0.1 Reference Guide

15.2.18 set (Store a Value in a Variable)

Description

Stores a value in a variable.

Synopsis

set varname [value]

Options

varname

Specify the name of the variable that stores the value.

value

The value to store. Specify a numeric value or string. If omitted, the value of the variable specified by varname is not changed.

Return Values

The value stored in the variable varname after processing has been completed (if value has been specified, the value of value; if it has not been specified, the value having been stored in the variable varname)

Caution

If value is omitted, the value stored in the variable varname as the return value will be returned. Thus, a new variable specified by varname will result in an error.

Example

The following example stores a numeric value in variable rc and a text in variable msg.

set rc 1
set msg "File open error"