SYNCENTURY

Two-digit year used to determine default century

WSupported on Windows
USupported on Unix
VSupported on OpenVMS

 

The SYNCENTURY environment variable defines a sliding window for Synergy/DE default century methods by specifying a two-digit year to be used as a defining point. Years prior to the specified year use one century, while years the same as or later than the specified year use a different century.

A two-digit year in the range 00 – 99.

UI Toolkit and ReportWriter enable you to define a method that is called whenever a default century is required. If no century method is registered but SYNCENTURY is defined, an internal century method is called. If SYNCENTURY is not defined or is invalid, Toolkit and xfODBC use the current system century, while ReportWriter uses 19 as the century for all dates stored in YYMMDD, YYJJJ, and YYPP formats.

The default century method used by Toolkit, ReportWriter, and xfODBC provides a sliding window whereby the default century for each side of the window is determined by SYNCENTURY and the current year. If the current two-digit year falls between 0 and SYNCENTURY, years between 0 and SYNCENTURY use the current system century, while years between SYNCENTURY (inclusive) and 99 use the previous century. If the current two-digit year falls between SYNCENTURY (inclusive) and 99, years between 0 and SYNCENTURY use the next century, while years between SYNCENTURY (inclusive) and 99 use the current system century.

The following table contains the translated four-digit year when SYNCENTURY is set to 50:

Current year

Year entered by user

Translated four-digit year

1998

0

2000

1998

49

2049

1998

50

1950

1998

99

1999

2000

0

2000

2000

49

2049

2000

50

1950

2000

99

1999

Note

Selection and sorting of dates in YYMMDD, YYJJJ, or YYPP formats are not optimized if SYNCENTURY is set or if %RW_CENTURY_METHOD is specified.

For ReportWriter and UI Toolkit:

The environment. On Windows, this environment variable can also be set in the [synergy], [dbr], or [myprog] section of synergy.ini (where myprog is any .dbr file).

For xfODBC:

For standalone configurations, set SYNCENTURY in the connect file or in the environment. For client/server configurations, set it in the connect file on the server.

ReportWriter, UI Toolkit, xfODBC, fcompare

On Windows, if set in the synergy.ini file,

[synergy]
SYNCENTURY=50