$ENVIRONMENT (get environment information)
$ENVIRONMENT acquires the environment settings information of the asset management server.
Syntax
return-value=$ENVIRONMENT(section-name,key-name)
Values
-
return-value
Specifies the name of the variable into which the acquired environment information is set.
-
section-name
Specifies a section name that corresponds to an environment settings category on the asset management server. A constant must be enclosed in single quotation marks ('').
-
key-name
Specifies the name of the key that corresponds to the value of an environment setting, either as a constant or a variable. A constant must be enclosed in single quotation marks ('').
For details about section name and key names, see the JP1/IT Desktop Management 2 - Asset Console Configuration and Administration Guide.
Status
The following table lists and describes the possible statuses:
|
Status |
Description |
|---|---|
|
NORMAL |
Normal end |
|
NODATA |
The specified section name or key name does not exist. |
|
ERROR |
— |
|
Script execution interrupted |
An invalid argument was specified, or an error other than the above occurred. |
- Legend:
-
—: Not applicable
Example
The following example acquires the contract history acquisition setting specified in the environment settings:
[SET_VALUE]
VAL= $ENVIRONMENT('BASE','CONTRACT_HISTORY')
MSG = 'BASE CONTRACT_HISTORY = ' +VAL
$ECHO(MSG)- Execution result:
-
BASE CONTRACT_HISTORY = YES