Re: DBCENTURY
Posted in 1998
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
V. DBCENTURY IMPLEMENTATION FOR 4GL TOOLS 4.20 OVERVIEW ======== Prior to 4gl tool 4.20 product release, in 4.1X release if only the year is provided for date value, the present(1900) century is used to extend the date. At the turn of the century, this would lead to problems. The Informix solution to this Year 2000 problem for 4gl tool 4.20 product release comprises of user setting a DBCENTURY environment variable which give the flexibility to the user to set the desired century in the 4gl tools. ENVIRONMENT VARIABLE DBCENTURY ============================== The user can set the environment variable DBCENTURY to one of the following: 'P' : Past 'F' : Future 'C' : Closest 'R' : Present If the variable is not set, Informix 4GL Tools 4.20 will assume the If the variable is not set, Informix 4GL Tools 4.20 will assume the variable to be set to 'R' i.e. Present Century setting. The valid setting mentioned above for environment variable DBCENTURY variable means following: DBCENTURY = 'P' (Past) This setting uses two centuries - current century and the past century for extending the date values. The two values are compared with the current date and the value which is closest previous date to the current date is chosen. DBCENTURY = 'F' (Future) This setting uses two centuries - current century and the next century for extending the date values. The two values are compared with the current date and the value which is closest future date to the current date is chosen. DBCENTURY = 'C' (Closest) This setting uses three centuries - current, past and next century for extending the date values. The three values are compared with the current date and the value which is closest to the current date is chosen. If the variable is not set, Informix 4GL Tools 4.20 will assume the variable to be set to 'R' i.e. Present Century setting. compared with the current date and the value which is closest to the current date is chosen. DBCENTURY = 'R' (Present - Default) This setting uses the Present(Current) century to extend the date. Examples ======== ============================================================================ ==== Current Date User Entered 'P' 'F' 'C' 'R' ============================================================================ ==== 4/6/1996 01/01/01 01/01/1901 01/01/2001 01/01/2001 01/01/1901 01/01/90 01/01/1990 01/01/2090 01/01/1990 01/01/1990 4/6/2010 01/01/95 01/01/1995 01/01/2095 01/01/1995 01/01/2095 01/01/05 01/01/2005 01/01/2105 01/01/2005 01/01/2005 01/01/25 01/01/1925 01/01/2025 01/01/2025 01/01/2025 01/01/50 01/01/1950 01/01/2050 01/01/2050 01/01/2050 ============================================================================ ==== Hope this gives enough info chesseco@opensoft.co.za John Bitsche <john.bitsche@wholefoods.com> wrote in article <35087D4A.1028C1D2@wholefoods.com>... > Tim Jones - Romac wrote: > > > Does Informix or HP have use the DBCENTURY variable. > > Where can I find documentation on this variable and how it is used. > > > > Thanks in advance.. > > Tim Jones > > You might also look at > http://www.informix.com/informix/products/year2000.htm > which briefly explains the issue and then mentions specific product > release levels which support DBCENTURY. > -- > John Bitsche > Programmer/Analyst > Whole Foods Market > Austin, Texas > john.bitsche@wholefoods.com > > >