help with cobol date

From: ritchie (ritchie_s01_at_yahoo.com)
Date: 11/22/03

  • Next message: Michael Mattias: "Re: Is cobol a flasher in public?"
    Date: 22 Nov 2003 05:43:12 -0800
    
    

    Hi,

    I am trying to accept a date and validate it against today's date.

    I am getting the user to enter a date - 8 digits ddmmyyyy(required).
    My problem is that, I dont want the user to be able to enter a date
    greater than todays date.

    I tried something like:
            01 date-in PIC 9(8).
            01 sys-date PIC 9(6).
             
    *user date
            ACCEPT date-in
    *system date
            ACCEPT sys-date FROM DATE
            
    Then check that the date-in is not greater sys-date, but the system
    date is comming out as YYMMDD, and therefore
    the users date is always greater than the system date.
    Is there a simplier way to check that the users date is less than
    today's date?

    Thanks in advance,
    Ritchie


  • Next message: Michael Mattias: "Re: Is cobol a flasher in public?"

    Relevant Pages

    • Re: Need help validating a phone number
      ... What would the number of digits in a phone number have to do with its ... Only way to validate a phone number is to dial it. ... required to fill in a survey form on some computers over in the corner. ... there were hundreds of Australians skiing at their resort. ...
      (comp.lang.php)
    • Re: Need help validating a phone number
      ... Only way to validate a phone number is to dial it. ... The author of the survey form made the mission critical error of deciding that the "zip code" needed to be valid to make sure their demographics were not "tainted with invalid data". ... Well over here in .au we don't have zip codes, we have postcodes, four digits long. ... It was when I met the president of what was then the second largest ISP in the United states, who said 'Do you realise the market in Europe is worth nearly as much as the entire united states AND canada' that my jaw dropped, and I realised what a total utter parochial prick I had to deal with. ...
      (comp.lang.php)
    • Re: How do I validate these fields
      ... digits is entered ... Validate by calculation: length= 4 ... "validate for 4 digit year". ... FileMaker Konferenz in Zürich Mai 2010 ...
      (comp.databases.filemaker)
    • Re: How do I validate these fields
      ... digits is entered ... Validate by calculation: length= 4 ... "validate for 4 digit year". ... FileMaker Konferenz in Zürich Mai 2010 ...
      (comp.databases.filemaker)
    • Re: trouble with replace
      ... What I want to do is remove all Currency ... >symbols so that I can validate the number. ... I am in South Africa and so ... followed by exactly two digits it is most unwise just to remove the ...
      (microsoft.public.scripting.jscript)