× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Year 300 bug in ILE RPG or ...? (Again)
  • From: jovic@xxxxxxxxxxxx
  • Date: Tue, 26 May 1998 22:22:39 -0600 (MDT)
  • Organization: Calgary Community Network Assoc.



        Bruce, thank you for quick and clear answer. No, Y 300 is not an
issue, but I really need cofirmation that there are no other suprises. 
Fact is, we are in the middle of Y2K conversion, and I'm trying to put in
place fresh and modern approach, and make it standard for our environment. 
That brings me into "warr situation" with some developers, and friendly
knife in the back is last thing I need :)))) 

Thank you once again,

Vanya

On Tue, 26 May 1998 bvining@VNET.IBM.COM wrote:

> 
> Well it turns out this is a known problem that had previously been
> reported by another customer who was also just testing some date ranges.
> As this customer did not see the need for proper year 0300 calculation,
> and to fix the problem would slow down ALL date conversions, the
> customer did not pursue the problem.
> 
> Our testing does confirm your finding, that is that only the year 0300
> shows the incorrect conversion from the internal date format to the
> external format.  If you feel that this requires fixing due to year 300
> requirements you should pursue this through normal support channels.
> 
> Bruce Vining
> 
> PS - As the current Gregorian calendaring system went into effect back
> in 1582, it is always up to debate how to handle dates prior to Oct 15
> 1582 anyway.
> 
> >Vanya,
> >
> >I have forwarded your report on to some of the developers.  This does
> >not appear to be a RPG problem (it is also easily recreated with SQL),
> >but rather a Date datatype anomaly where the day after Feb 29 300 is
> >Mar 02 300.
> >
> >Bruce Vining
> >
> >>
> >>        For some strange reason, my previous message was cut and came
> >> incoplete. Here is the full version.
> >>
> >>        Hi folks.
> >>        I was recently playing with dates and date types in RPG IV (you
> >>guess why :))), and have found something rather strange.
> >>
> >>        Wrote a program to print all leap years from 1 to 9999 using
> >>simple technique: set (*iso, but doesn't metter) date to March 01, and
> >>SUBDUR one day from it. If it ends up with Feb 29, it's a leap year. My
> >>program broke whenever it hit year 300. Same loop, same logic worked for
> >>all years in range from 1 to 9999, but for 300. Further investigation
> >>(dump and source debugger) showed that reason for it was that:
> >>
> >>(no format)
> >>D Ddate             s             d     DATFMT(*ISO)
> >>D Ndate             s           8   0
> >>
> >>
> >>C             Z-ADD   3000301     Ndate
> >>C    *ISO     MOVE    Ndate       Ddate
> >>
> >>set Ddate to '0300-02-29', and each subsequent use of Ddate crashes the
> >>program, because '0300-02-29' is invalid date (300 is not lep year).
> >>
> >>I tried later with string variables and with both numeric and string
> >>literals, but result was the same:
> >>
> >>C   *ISO      MOVE   3000301     Ddate
> >>or
> >>C   *ISO0     MOVE   '03000301'  Ddate
> >>
> >>Ddate has value of '0300-02-29'.
> >>
> >>Even worse, adding 1 day to '0300-02-28' would result with '0300-02-29'
> >>and than ... crash.
> >>
> >>        I've tested it on two V3.7 and one V4.1 system, results are the
> >>same.  Any ideas? What, so significant, had happened in 300 AD? Or
> >>something significant (good party :))) took place that night when IBM-ers
> >>were developing that piece of compiler? Or is it my mistake?
> >>
> >>Can't wait to hear from you,
> >>
> >>Vanya
> >>
> 
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> * This is the RPG/400 Discussion Mailing List!  To submit a new         *
> * message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
> * from this list send email to MAJORDOMO@midrange.com and specify       *
> * 'unsubscribe RPG400-L' in the body of your message.  Questions should *
> * be directed to the list owner / operator: david@midrange.com          *
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> 

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.