ADD
ADD adds the specified value to a field. The following table describes the parameters for the ADD exit.
ADD Parameter
Position | Value Description |
---|---|
1-19 | Specify the left-justified value to add to the original field. It must be numeric and may be 1 - 18 digits. Specify the value without a decimal point. The sign may be a separate trailing or leading position. The last digit may contain an embedded sign. |
Output Field Format
- Binary (COMP) fields may be 2, 4, or 8 bytes long.
- Numeric (EXTERNAL,DISPLAY) fields can be 1 - 18 digits, must be numeric, and may include an embedded trailing sign.
- Packed (COMP-3) fields can be 1 - 18 digits (1 - 10 bytes) and may have an embedded trailing sign. The value must be numeric.
Regardless of the sign of the value specified in the parameter, whether the output field is signed or unsigned is based on the original sign condition.
The original value is treated as an integer regardless of the implied number of decimal places. When specifying the parameter value, pay special attention to the number of decimal places.
For example: Adding 20 to a field with two implied decimal places.
Parameter value: 2000 (implied 20.00)
Resultant value: 14375 (implied 143.75)