ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

why they are used?

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

  • why they are used?

    IF SYSTEM-YY < SYS-CENTURY-CUTOFF
    (20) (20)
    MOVE SYS-CENTURY-NEXT TO SYSTEM-CC
    ELSE
    (19) (19)
    MOVE SYS-CENTURY-PREV TO SYSTEM-CC
    END-IF.


    in my cobol program they are using this code to validate the date.what is the purpose of using these....

  • #2
    Re: why they are used?

    Your program is using six digit dates and a date window of 100 years, say 1940 - 2039. If the year portion of your date is less than 40, the first two digits of the year are 20, i.e., 2010. If not: 1998.
    "Time passes, but sometimes it beats the <crap> out of you as it goes."

    Comment


    • #3
      Re: why they are used?

      This is so much easier in RPGIV
      Michael Catalani
      IS Director, eCommerce & Web Development
      Acceptance Insurance Corporation
      www.AcceptanceInsurance.com
      www.ProvatoSys.com

      Comment


      • #4
        Re: why they are used?

        It is not really that much harder in COBOL. This is old COBOL - i.e. the equivalent of RPG/400

        Comment

        Working...
        X