COMPANY
COMMUNITY
BLOG
HELP
MY ACCOUNT
EN PT ES

First year of 2th century=0 in COBOL or RPG

The function SYSDATE() depends on the preference "First year of 2th century". If the preference has value 0 (zero) and the year of the AS/400 is 2000, it interprets the date of the system as corresponding to 1900 (it should be 2000).

The function SYSDATE() depends on the preference "First year of 2th century". If the preference has value 0 (zero) and the year of the AS/400 is 2000, it interprets the date of the system as corresponding to 1900 (it should be 2000).

Solution: 

Changes were made in some “templates” of the Cobol and RPG generators. The function SYSDATE () is implemented in a different way, making a CALL to an AS/400 standard program (QCCVTDT) to obtain the date with all the digits. Thus, the problem is eliminated.
The function NOW() depends (internally) on the function SYSDATE(). Therefore, it has the mentioned problem, and the solution also applies to it.
Users with the value of the preference mentioned above in zero will have to regenerate and compile those programs that use the function SYSDATE() or NOW().
The change was done only in versions 6.0 and 6.1. They will be included in the following patches:

GeneXus version 6.0
   P
atch #8 COBOL Generator
  
Patch #7 RPG Generator

GeneXus version 6 Evolution I
  
Patch #3 COBOL Generator
   Patch #3 RPG Generator

If you need more information, please contact your local distributor.