6.2.22 Displaying a variable's value (print command)
The print command displays the value of a variable in the job definition script. You display a variable's value by specifying its variable name in the argument. The abbreviation for the print command is p. The following shows the format of the print command:
print variable-name
The following describes the print command's processing.
- When the print command argument is specified
-
If the specified variable is defined, the command displays its value. The following shows the display format:
variable-value
-
variable-value: Value of the specified variable. If there is no value, <No value> is displayed.
If the variable is undefined, the command outputs an error message.
-
- When the print command argument is omitted
-
The command outputs an error message.
- Notes:
-
-
If the job definition script is not being run by the run command, an error results because variable information has not been specified.
-
If you specify an array for the variable name, specify an array element.
-
Do not attach a dollar sign ($) to a variable name.
-
- Examples
-
- Display the value of variable a
(adshdb) print a
- Display the value of variable b[1] (array)
(adshdb) print b[1]