• Subject: Use of Timestamp data field How? Is IBM Y2k Compliant 1940 Onwards?
  • From: bvining@xxxxxxxxxxxx
  • Date: Fri, 15 Jan 99 10:32:26 CST

Kris,

I am not sure what release you are on, but...

Display files do support TIMESTAMP fields as of V4R2.  Timestamps are
defined as type Z and can be used as in:

       A          R FORMAT
                    TIMEZONE        Z     1  5
                    DATEFIELD       L     2  5

Where the following works on my system:

     Ftimezones if   e             disk
     F*
     F* timezones file is defined as:
     F*         R RECORD
     F*           TIMEZONE        Z
     F*
     F* and initialized with:
     F*
     F* INSERT INTO VINING/TIMEZONES VALUES('0001-01-01-00.00.00.000000')
     F* INSERT INTO VINING/TIMEZONES VALUES('1901-12-25-01.15.00.000000')
     F*
     Fdspf      cf   e             workstn
     F*
     F* timezones file is defined as:
     F*         R RECORD
     F*           TIMEZONE        Z
     F*
     Ddatefield        s               d
     C                   read      record
     C                   move      timezone      datefield
     C                   exfmt     format
     C                   move      '1'           *inlr
     C                   return

Prior to V4R2 *DSPFs did not support Date, Time, or Timestamp but Dates
could certainly exceed the 1940 to 2039 window.  As example of this
would be:

     Ftimezones if   e             disk
     Ddatefield        s               d
     C                   read      record                                 01
     C     *in01         doweq     '0'
     C                   move      timezone      datefield
     C     datefield     dsply
     C                   read      record                                 01
     C                   enddo
     C                   move      '1'           *inlr
     C                   return

Is it possible you have your Date/Timestamp defined with only a 2-digit
year format?  This is typically where I see the 1940 to 2039 window
being applied.

Hope this helps,
Bruce

>Hi
> Thought I'd be Y2k Compliant and created timestamp field in data file.
>Since I added the field and did a CHGPF based on source did not loose any
>data. However the field was initialized to 0001-01-01-000 etc.
>
> I want to display this filed on the screen and wrote a little program.
>
> First problem, could not figure out how to define the stamp to be
>displayed.
>
> So defined a date type field and Time type filed.
>
>Did a MOVE of Timestamp to date type field.
>
> Program fell over.... Date has to be within 1940 to 2039 range. Error
>message was pretty explicit about this..
>
> What goes... Yes timestamp will when program is live be in the correct
>range, but it does raise questions about the Move operation?
>
>krisV
>

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].