Synopsis
jobschchknetvar varname [-num operator,value[,operator2,value2] | -char comp method,char string] [-z] |
Description
The jobschchknetvar command is called by jobs that check the values of job net variables.
Specify a condition against which the value of the specified job net variable is compared. Values can be compared as a numeric value or a string.
If you do not specify a condition, this command will check if the variable exists and information on the job net variable will be displayed in the standard output. If a variable with the target variable name does not exist, the condition will not be matched.
Information about the job net variable being checked is displayed in standard output in the format "varname=value". If the variable being checked does not exist, nothing is displayed.
Options
varname
Specify the name of the job net variable to be evaluated using up to 64 bytes.
The format of the job net variable name is <job net variable prefix>.<name output to job output information ("NAME" in the "NAME=VALUE" format)>.
If neither -num nor -char is specified, specify the name of the variable for checking the existence of the variable. If it exists, the condition is met. If the specified variable exists and the value is an empty string, the variable will be treated as if it exists.
-num operator,value[,operator2,value2]
Treat the value of the job net variable as a numeric value for comparison.
You can compare the job net variable against a single value or a range of values.
To compare against a single value, specify only "operator" and "value".
To compare against a range of values, also specify "operator2" and "value2". The job net variable is compared against the range from "value" to "value2" inclusive.
For numeric comparison against a single value:
The following six "operators" are available:
EQ (EQual)
Equal to "value"
NE (Not Equal)
Not equal to "value"
GT (Greater Than)
Greater than "value"
GE (Greater than or Equal to)
Greater than or equal to "value"
LT (Less Than)
Less than "value"
LE (Less than or Equal to)
Less than or equal to "value"
Specify an integer from -2147483648 to 2147483647 as the value that is compared with the variable value.
For numeric comparison against a range of values
Specify one of the following for "operator1":
GT (Greater Than)
Greater than "value1"
GE (Greater than Equal to)
Greater than or equal to "value1"
Specify one of the following for "operator2":
LT (Less Than)
Less than "value2"
LE (Less than Equal to)
Less than or equal to "value2"
Specify an integer from -2147483648 to 2147483647 for "value1" and "value2". Ensure that "value1" is less than "value2".
-char char comp method,char string
Treat the value of the job net variable as a string for comparison.
Specify one of the following comparison conditions:
EQ (EQual)
The value of the variable is equal to the comparison string
NE (Not Equal)
The value of the variable is not equal to the comparison string
IN (INclude)
The value of the variable includes the comparison string
NI (Not Include)
The value of the variable does not include the comparison string
Specify a string of up to 512 bytes excluding user-defined characters.
If nothing is entered for the comparison string, behavior will be as follows:
When the comparison condition is EQ:
The condition is met if the value of the variable is an empty string.
When the comparison condition is NE:
The condition is met if the value of the variable is other than an empty string.
When the comparison condition is IN:
The condition is regarded as not being met.
When the comparison condition is NI:
The condition is always met.
-z
Reverses the return values of the comparison.
When the -z option is not specified
If the condition is met, 0 is returned. If the condition is not met, 1 is returned.
When the -z option is specified
If the condition is met, 1 is returned. If the condition is not met, 0 is returned.
Return Values
Return value | Meaning |
---|---|
0 | Terminated normally The -z option was not specified and the condition was met. The -z option was specified and the condition was not met. |
1 | Terminated normally The -z option was not specified and the condition was not met. The -z option was specified and the condition was met. |
2 or more | Terminated abnormally |
Command Location
Windows | Systemwalker Operation Manager installation directory\MpWalker.JM\bin |
Solaris | /usr/bin |
Cautions
This command can be executed only if it is registered as a Systemwalker Operation Manager job. It cannot be executed directly from the command prompt or as anything other than a Systemwalker Operation Manager job.
This command uses the job net variable set on the schedule server in the comparison. It cannot be executed in network jobs or Distributed Execution jobs.
Job net variables automatically set by the system cannot be specified.
Example
An example job definition that checks if the value of job net variable "JOB.ABC" is equal to string "xyz" is shown below:
jobschchknetvar JOB.ABC -char EQ,xyz |
Execution Result/Output Format
JOB.ABC=xyz |