Hitachi

Job Management Partner 1 Version 10 Job Management Partner 1/Advanced Shell Description, User's Guide, Reference, and Operator's Guide


5.3.1 Arithmetic operators

Arithmetic operators are used in job definition scripts to perform arithmetic operations on the values of variables. The following table lists and describes the arithmetic operators supported by JP1/Advanced Shell.

Table 5‒26: Arithmetic operators supported by JP1/Advanced Shell

Arithmetic operator

Description

-num

This is a unary minus operator. It changes num to a negative value.

num1*num2

Returns the results obtained by multiplying num1 by num2.

num1/num2

Returns the results obtained by dividing num1 by num2.

num1%num2

Returns the remainder obtained when num1 is divided by num2.

num1+num2

Returns the results obtained by adding num1 and num2.

num1-num2

Returns the results obtained by subtracting num2 from num1.

num1**num2

Returns the results obtained by exponentiating the value num1 to the power num2.

If a value smaller than 0 is specified for num2, the command outputs the KNAX6068-E message and terminates with an error with return code 2.