DataFlex and the Year 2000
A Data Access Corporation White Paper
This document is a Year 2000 Readiness Disclosure under the
United States Year 2000 Information and Readiness Disclosure Act.
Revised August 24th, 1999Executive Summary
DataFlex has been Year-2000-capable since its introduction.
Developers have always been able to write Year-2000-compliant
applications. However, primarily for data-entry reasons, and
compactness of displays, many, if not most, legacy applications were
written in a way that is not Year-2000-compliant.
In most cases, correcting such applications involves changes to both
the data and the programs. If you have access to your applications'
source code and the compiler, you take advantage of solutions that
are typically lacking in other application/development environments:
- Correcting the dates will not require moving any data:
four-digit-year data automatically fits into the disk space
already occupied by two-digit-year data.- You can attain Year-2000 compliance entirely without
additional software or other expenditures.- Data Access Corporation does offer simple, inexpensive
update revisions with which you can retain two-digit-year data
entry in the trans-millennial period. To update these products,
it is not necessary to change your revision of DataFlex if you
have Revision 2.3 (introduced in 1987) or 3.1. Users of
DataFlex prior to 3.1 should update to 3.1.All versions (DOS, Console Mode, and UNIX) of DataFlex revision
3.1c and 3.1d, and all Visual DataFlex revisions (6.0 is the most
current) include utilities to aid in conversion of two-digit-year data,
and support cross-century data entry using two-digit years. The
same capabilities are available for DataFlex 2.3 (DOS version only)
in a separate product called DataFlex 2.3b Enhanced Runtime. If
you have a previous revision of DataFlex 3.x that does not contain
these capabilities, getting them is as simple as updating to the current
DataFlex Revision 3.1d from Data Access Corporation.
It is important to note that a non-compliant application can still be
written today in the latest revision of DataFlex. The Year-2000
enhancements of DataFlex require deliberate programming steps to
implement them in applications. Merely deploying these with an
otherwise-unchanged noncompliant application will very seldom
make the application compliant. In fact, all DataFlex licenses are
shipped with their enhanced functionality turned OFF in order to
protect against mishandling of existing programs and data that have
not themselves been modified as described below. The processes of
turning the Year-2000-enhancement functionality on and converting
existing data are described in the environment guide provided with
each product.
Some non-compliant applications can be made compliant without
recompilation, by updating the revision of DataFlex in which they are
running and turning on the Year-2000 enhancements. It is hard to
determine and confirm the compliance of such applications without
extensive testing of actual and hypothetical data, and for this reason,
this method of attaining Year-2000 compliance is neither
recommended nor warranteed in any way.
Naturally, the Year-2000 compliance of any program, DataFlex or
otherwise, will fail if the operating system or firmware under which
the program is running is not Year-2000 compliant.
Back to top
Programs
The source code of all your programs must be searched for any and
all calculations with, or manipulations of, dates. Once these are
found, each must be reviewed for whether they will properly handle
four-digit-year dates. Any calculations relying on two-digit-year date
constants (e.g., 12/12/50) are likely to need revision, as are uses of
the SYSDATE command, which returns a two-digit-year date. You
may also have to change the user interface to show all four digits of
the year. Once these are corrected, the source code may be
recompiled, but the new programs should not be placed into use until
the data on which they operate has been converted to four-digit-year
(see below).
If you have programs that handle dates for which the source code is
no longer available, you may still be able to continue using your
present applications without change, but this should not be attempted
without the original developer and/or a consultant qualified to check
DataFlex applications for Year 2000 compliance. Data Access
Corporation or a DataFlex distributor may be able to direct you to a
consultant or provide the assistance themselves.
Back to top
Data
No DataFlex application using two-digit-year data on disk can
comply with Year-2000 requirements. Converting two-digit-year
dates on disk to four-digit-year is as simple as adding 1900 years to
the dates, which could be done by even a beginning DataFlex
programmer. The process of doing this is described on Page 122 of
the DataFlex Encyclopedia of DataFlex 2.3 and Page 210 of the
Encyclopedia of Revision 3.1.
As already mentioned, no change in disk-space allocation is required
by this conversion. All data may remain in its present physical
position. The only additional space required for conversion is for a
backup copy of the data, which may be deleted as soon as the
conversion has been completed and the data's results have been
confirmed. Just as Year-2000-capable programs should not be used
with two-digit-year data, four-digit-year data should not be used
with application programs that were designed for two-digit-year
dates.
Back to top
2000 Is Handled Correctly As a Leap Year
All revisions of DataFlex have correctly provided the date February
29 in the Year 2000.
Act Now
An industry authority recently made this observation regarding the
Year 2000 challenge to the IT industry, noting, "This problem is
actually little different from other conversion tasks, except for its
universal scope and its immovable deadline." (Emphasis added by
Data Access Corporation).
Back to top
Technical Guide
The following section is intended as a programmer's guide to the
steps necessary to converting existing DataFlex applications to
comply with Year 2000 requirements. Some of the following steps
apply to every DataFlex application that uses dates in any fashion,
even just for reporting. The steps vary according to which revision of
DataFlex the application is currently running in, and whether a
Year-2000-enhanced revision of DataFlex is to be adjusted.
Back to top
The Revisions
DataFlex always displays its revision number when it starts up. If
your main menu is in DataFlex, this will probably happen sometime
around the moment you turn your computer on. If your DataFlex
application is started from a non-DataFlex menu, this will happen
when your application is chosen from the menu. The shaded areas in
the table below are considered Year-2000-enhanced.
REVISION SYSDATE4? EPOCH? CONV2000 DataFlex 1.x No No No DataFlex 2.0x No No No DataFlex 2.1x No No No DataFlex 2.2x No No No DataFlex 2.3x No No No DataFlex 3.0x No No No DataFlex 3.05e Passive No No DataFlex 3.1 Passive No No DataFlex 3.1c Active Yes Yes DataFlex 3.1d Active Yes Yes Visual DataFlex 4.0 Active Yes Yes Visual DataFlex 5.x Active Yes Yes Visual DataFlex 6.0 Active Yes Yes DataFlex 2.3 Enhanced Active Yes Yes Back to top
Revision
Regardless of Windows or character-mode. "x" indicates any digit.
All lettered sub-revisions are included except where a specific letter
sub-revision is listed beneath.
Back to top
SYSDATE4
This is a command similar to the sysdate command, except that it
returns a four-digit-year date from the environment. Its use is
optional, and the original (two-digit-year) sysdate command is
supported in parallel. "Passive" refers to the support for the
command in source code only, while "Active" refers to support for
environment settings that convert the returns from the original
sysdate commands without recompiling the programs. Active
support includes passive support.
Back to top
Epoch
This supports a setting by means of which two-digit-year data entry
can be interpreted as 1900s or 2000s according to whether the
two-digit year is above or below the epoch value. Epoch values can
be set environmentally and/or in code. This functionality is sometimes
called "date windowing."
Back to top
CONV2000
This utility is designed to find date fields in database files and inspect
their data. If any such data is found that represents a two-digit year,
that data is replaced with the equivalent four-digit-year date. It is a
DataFlex program. It is not required for the performance of this
process; it is primarily a convenience.
With regard to date values in the database, all revisions are alike.
Revisions make a difference only with respect to application
programs and the system's facilities for managing and converting date
data.
Back to top
Windows vs. Character-Mode
When using the epoch functionality to support two-digit-year data
entry, the Windows environment supports interface behavior that is
significantly different from that supported in DOS, OS/2, UNIX, and
XENIX. In Windows, unless picture masking is employed to do
otherwise, dates are always displayed in four-digit-year precision,
regardless of whether dates are input with two-digit or four-digit
years.
In character-mode environments, two-digit-year windows are
supported for data entry (including display of database values). Thus,
such windows will display dates that could be unclear to a user
unaware of the epoch value in force. The best method is to use
four-digit-year windows for dates. With epoch in force, these will
accept and interpret entry of two-digit years, but display values from
the database clearly. If four-digit-year windows are impracticable for
any reason, the next-best alternative would be to display the epoch
value that is in force on the screen in a position as close as possible
to the date window(s).
Back to top
Inspecting Source Code
The source code for every program in your application must be
inspected for two things: date calculations and uses of the sysdate
command.
With regard to date calculations, two-digit-year constants should be
replaced with four-digit-year constants. For example, the date
9/9/80 should be replaced with 9/9/1980. It is always better practice
to use Integer values for date constants, because the calculation is
not affected by whatever date format DataFlex is using. Where this
was done, you can accomplish the recommended conversion by
adding 693975 to the two-digit-year Integer values you find.
With regard to sysdate, the same approach is recommended. If the
revision of DataFlex you are using has the sysdate4 command (see
table above), replace every use of sysdate with the new command.
Where the revision you are using does not have the new command,
there are a number of ways of modifying the returned value. In fact,
such measures may already be in use in your programs.
What is recommended in the absence of a sysdate4 command is
either to update to one of the revisions listed above as having it, or
placing code around each use of the sysdate command to add
693975 to its output. Here is an example of code as you may find
it:sysdate image.3
Here is how such code should be modified:date vd2digitsysdate
vd2digitmove (vd2digit + 693975) to image.3
Once all date constants have been modified and sysdate statements
corrected as described above, recompile all programs whose source
code was changed. Do not use the new programs with the old data;
they may be used only on data that has been converted as described
above.
Contacting Data Access Worldwide
Data Access Worldwide
14000 SW 119 Ave
Miami, FL 33186
305-238-0012
Domestic Sales: 800-451-3539
Fax: 305-238-0017
email: sales@dataaccess.com
Newsgroup Server: news.dataaccess.com
Internet: http://www.dataaccess.comData Access Worldwide - Asia Pacific
Suite 5, 333 Wantirna Road, Wantirna VIC 3152 Australia
Phone: +61 3 9800 4233 f: +61 3 9800 4255
Sales: asiapacific@DataAccess.com
Support: support.asiapacific@DataAccess.com
Internet: http://www.DataAccess.com/AsiaPacificData Access Worldwide - Brasil
Av.Paulista, 1776 - 21st.Floor
São Paulo -SP - Brazil
CEP 01310-921
Phone: 5511-3262-2000
Fax 5511-3284-1579
Sales: info@dataaccess.com.br
Support: suporte@dataaccess.com.br
Internet: http://www.dataaccess.com.brData Access Worldwide - Europe
Lansinkesweg 4
7553 AE Hengelo
The Netherlands
Telephone: +31 74 - 255 56 09
Fax: +31 74 - 250 34 66
Sales: info@dataaccess.nl
Support: support@dataaccess.nl
Internet: http://www.dataaccess.nlData Access Technical Support
800-451-3539 / 305-232-3142
email: support@dataaccess.com
Visit our Support Home page to see all of our Support options: http://www.dataaccess.com/supportData Access Technical Knowledge Base http://www.dataaccess.com/kbase
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.Copyright Notice
This document is property of Data Access Corporation. With credit to Data Access Corporation for its authorship, you are encouraged to reproduce this information in any format either on paper or electronically, in whole or in part. You may publish this paper as a stand alone document within your own publications conditional on the maintenance of the intent, context, and integrity of the material as it is presented here.DataFlex is a registered trademark of Data Access Corporation.
NO LIABILITY FOR CONSEQUENTIAL DAMAGES
To the maximum extent permitted by applicable law, in no event shall Data Access Corporation be liable for any special, incidental, indirect, or consequential damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising out of the use of or inability to use any information provided in this document, even if Data Access Corporation has been advised of the possibility of such damages. Because some states and jurisdictions do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you.