Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

RPG BLEWS IN V4R4M0 !!!!!! AddDur Fails for LEAP YEAR Calculation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • RPG BLEWS IN V4R4M0 !!!!!! AddDur Fails for LEAP YEAR Calculation

    This is interesting; I'm not real sure BMI ever really understood the Gregorian Calendar. At one time, for example, Lotus Notes did not have a 29 Feb 2000 and it would be interesting to check Notes for the problem you're having. Check to see how many days between and including 01 Jan 0001 and 31 Dec 400; it should be 146097. It's for sure the only 'century years' with a Feb 29th in the Gregorian Calendar are 400, 800, 1200, 1600, 2000 and 2400 ... Please keep us posted; you might want to look at www.calendarzone.com. bobh

  • #2
    RPG BLEWS IN V4R4M0 !!!!!! AddDur Fails for LEAP YEAR Calculation

    Here's another that has the same error: www.Ernie.Cummings.net/month.htm I'll bet both are using Latham's C routines. bobh

    Comment


    • #3
      RPG BLEWS IN V4R4M0 !!!!!! AddDur Fails for LEAP YEAR Calculation

      This is a known system problem that will not be fixed for performance reasons. Below is the text for the APAR MA22296. " The internal date format used by the AS/400 is scaliger. All date calculations are done using the scaliger representation of the dates. The scaliger conversion algorithm imported to the AS/400 correctly represents dates from 4713 BC to 5,874,776 AD. However, the algorithm has a known bug with the date 3/1/300 which converts to 2/29/300. AS/400 development investigated fixing this quirk in the scaliger algorithm and designed a workaround which was tested in the development of the V4R1 release. The performance impact of the workaround was found to be too great to justify fixing this one particular date. "

      Comment


      • #4
        RPG BLEWS IN V4R4M0 !!!!!! AddDur Fails for LEAP YEAR Calculation

        Oh well, that explains what I need. Thanks barbara.

        Comment


        • #5
          RPG BLEWS IN V4R4M0 !!!!!! AddDur Fails for LEAP YEAR Calculation

          They don't understand Julian dates either. It has nothing to do with Julius Caesar. The man who devised it named it after his father. It is actually a perpetual consecutive date stemming from a period when 4 calendar systems all started their respective year on the same day. I don't remember all the systems, but one is lunar, sidereal, ???. Their start days will coincide 15,000 years apart. The Julian date for today is not what IBM tells us it is since it also includes the time down to the second. Completely useless information, but interesting (to me at least). On a different note, I read an article about 8 or 9 years ago about a proposed perpetual calendar that would remain the same year after year. Each quarter would have months of 30 30 31 starting on Sunday and ending on Saturday. Each year would actually start on New Years day between Saturday December 31 and Sunday January 1. On leap year here would be a Leap year day between Saturday June 31 and Sunday July 1. Sounds weird but after you think about it, it is veery ordered. It also gives an automatic 3 day weekend to those of us that don't normally work the weekends. It would also give consulting a large shot in the arm modifying code to coincide with the new calendar. Just think, a Y2K project all over again. I could certainly handle the increased billing rates. Bill

          Comment


          • #6
            RPG BLEWS IN V4R4M0 !!!!!! AddDur Fails for LEAP YEAR Calculation

            AND - speaking of useless information, The Julian Date starts with 0 being noon, Jan 1, 4713 BC There is a Modified Julian Date in use, which is JD - 2400000.5 (the .5 is to get rid of the pesky noon start) MJD starts some time in the 1850s. I believe today is MJD 52102 Bill

            Comment


            • #7
              RPG BLEWS IN V4R4M0 !!!!!! AddDur Fails for LEAP YEAR Calculation

              Y300 Bug!!!! RPG Blews when using ADDDUR for one month for the date '02/01/0300'. I have a routine to print something for each month. I am using 01 as day and incrementing one month to the date using AddDur 1:*M. For some or other reasons, I used the start date as '01/01/0001' and keep incrementing by one month in a loop. After incrementing, I move the value to a database field type 'L'. The loop was working fine, until it hit the year 300. Somehow, AddDur 1:*M adds 29 days for February month in Year 300. The value of the Field TRDAT before AddDur was is '02/01/0300'. After AddDur 1:*M, it gives the value '02/29/0300'. Weired!!! when I move TRDAT to database field TRDATE, RPG blews with the Error ID RNX0112. My code is as follows.
               D TRDAT S D DatFmt(*USA) * TRDATE is Database field type L, DatFmt(*USA) C Dow TrDat <= EndDat C AddDur 1:*M TrDat C Move TRDAT TRDATE C ..... C Enddo 
              We are currently Using System level V4R5M0, Compiler V4R4M0 with latest PTF's installed. Is there anybody who can test in V5R1M0? Or is it time to call IBM? This is the first time ever I found a BUG in RPG. Keep me posted everybody. Btw, my client does not bother about this right now, as we do not deal with Y300!!!!! Thanks Elan

              Comment


              • #8
                RPG BLEWS IN V4R4M0 !!!!!! AddDur Fails for LEAP YEAR Calculation

                I remember something about that from doing DBASE III programming. It was fairly simple doing date math with it. Have a Good Day Bill

                Comment

                Working...
                X