TITLE
    EOF 1.x: Correcting Century Issues in the EOF Examples
Article ID:
Created:
Modified:
70084
7/7/99
9/10/99

TOPIC

    Apple is not aware of any century problems with Enterprise Objects Framework versions 1.1 or 1.2 which would affect development or deployment of EOF applications. However, two scripts which install example data on Oracle for the Enterprise Objects Examples use a two-digit year format, which is not consistent with Apple's recommended date-handling practice. This article provides instructions on how to convert these example scripts to the preferred four-digit year format.

    EOF uses many components of the underlying OPENSTEP or NeXTSTEP system. In order to ensure that EOF is year 2000 compliant, you must install the appropriate OPENSTEP, OPENSTEP Enterprise, NeXTSTEP, or PDO patch on your system, following the install order given in the patch overview document.

    EOF 1.0 has not been tested for year 2000 problems; current EOF 1.0 users will be provided with an upgrade to EOF 1.1 at no charge. For more information, please see Apple Enterprise Software's Year 2000 page at http://www.apple.com/enterprise/y2k/ . For year 2000 information on EOF 2.X, please see TIL article 70085 .

    For more information on Apple's Year 2000 program and the Year 2000 status of Apple software products, please visit the Year 2000 Information Page at http://www.apple.com/about/year2000/


DISCUSSION

    Two scripts which populate database tables for the People example use two-digit years in their date values. Customers can edit these scripts to use the four-digit year format which Oracle provides. The two problem scripts are "installPEOPLE.sqloracle6" and "installPEOPLE.sqloracle7" in /NextDeveloper/Examples/EnterpriseObjects/PeopleDBScripts.

    In "installPEOPLE.sqloracle6", for all he insert statements into the EMPLOYEE table, change the two-digit year data to use a four-digit year. For example:


    insert into EMPLOYEE values ( 101, 101, 'Winston', 'James', '415-323-7265', '6269 Washington Ave.', 'Woodside', 'CA', '94160', 1, ' 14-JAN- 89 ', 101, 5700.00 );


    should be changed to:


    insert into EMPLOYEE values ( 101, 101, 'Winston', 'James', '415-323-7265', '6269 Washington Ave.', 'Woodside', 'CA', '94160', 1, ' 14-JAN- 1989 ', 101, 5700.00 );


    In "installPEOPLE.sqloracle7", for all the insert statements into the EMPLOYEE table, change the two-digit year data to use a four-digit year and change the date format to a four-digit year specifier. For example:


    insert into EMPLOYEE values ( 101, 101, 'Winston', 'James', '415-323-7265', '6269 Washington Ave.', 'Woodside', 'CA', '94160', 1, TO_DATE(' 14-JAN- 89 ', ' DD-MON- YY '),101, 5700.00 );


    should be changed to:


    insert into EMPLOYEE values ( 101, 101, 'Winston', 'James', '415-323-7265', '6269 Washington Ave.', 'Woodside', 'CA', '94160', 1, TO_DATE(' 14-JAN- 1989 ', ' DD-MON- YYYY '),101, 5700.00 );


    The scripts may be modified using any text editor, or by the use of 'sed', as demonstrated below. You must have the proper permissions to edit these files.

    mv installPEOPLE.sqloracle6 installPEOPLE.sqloracle6.bak
    sed 's/[0-9][0-9]\-[A-Z][A-Z][A-Z]\-/&19/g' installPEOPLE.sqloracle6 > installPEOPLE.sqloracle6

    mv installPEOPLE.sqloracle7 installPEOPLE.sqloracle7.bak
    sed 's/[0-9][0-9]\-[A-Z][A-Z][A-Z]\-/&19/g' installPEOPLE.sqloracle7.bak | sed 's/YY/YYYY/g' foo > installPEOPLE.sqloracle7


Document Information
Product Area: Apple Software; WebObjects
Category: Enterprise Objects Framework
Sub Category: General Topics; Development

Copyright © 2000 Apple Computer, Inc. All rights reserved.