Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Programming Guide


Performing arithmetic on date fields

You can perform arithmetic operations on numeric date fields in the same manner as on any numeric data item. Where appropriate, the century window will be used in the calculation.

However, there are some restrictions on where date fields can be used in arithmetic expressions and statements. Arithmetic operations that include date fields are restricted to:

The following arithmetic operations are not allowed:

Date semantics are provided for the year parts of date fields but not for the nonyear parts. For example, adding 1 to a windowed Gregorian date field that contains the value 980831 gives a result of 980832, not 980901.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)