Version 4.2.6 for Mainframes (Update)
 —  Parameter Reference  —

MAXYEAR - Maximum Year for Date/Time Values

This Natural profile parameter sets the maximum value for the year part of date and time values that can be entered as constants or as terminal input.

Possible settings 2699 The maximum year that can be entered is 2699; that is, the maximum date value that can be entered is 2699-12-31.
9999 The maximum year that can be entered is 9999; that is, the maximum date value that can be entered is 9999-12-31.
Default setting 2699  
Dynamic specification yes  
Specification within session no  

MAXYEAR=9999 changes the maximum date value that can be entered from 2699-12-31 to 9999-12-31.

Note:
Before setting the value for MAXYEAR to 9999, you should carefully check your application for arithmetic operations or assignments of date or time values to fields that have data formats other than date or time, and perform the necessary changes. Otherwise, unexpected overflows leading to Natural errors at execution time may occur. For example, you should check for

The use of the Natural Engineer is recommended to check your application.

The setting of MAXYEAR affects

You should ensure that the MAXYEAR settings are the same for

Warning:
Natural applications that were cataloged with the Natural Optimizer Compiler using the OVFLW=ON option set (See Optimizer Options for more information) have to be recataloged with Natural Optimizer Compiler Version 4.2.2 or above and must be executed with Natural Version 4.2.2 or above to ensure that the MAXYEAR profile parameter setting is correctly applied. If an application that uses date/time fields has been recataloged with Natural Optimizer Version 4.2.2 or above, and is afterwards executed with Natural Version 4.2.1, an ABEND will occur at runtime.

See also:

Top of page