Validate date in COBOL/400

10 pts.
Tags:
COBOL
COBOL/400
I have date in yyyymmdd format. I want to validate if it lies between a particular period of 2 years let b/w 1 Jan 2012 to 5 April 2014, in COBOL/400.... Please help me as the intrinsic function like that in COBOL are not working in this case. Thanks.
ASKED: January 31, 2013  7:22 PM
UPDATED: January 31, 2013  7:23 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • LetItBe
    Date-to-check = 20120515fromdate = 20120101thrudate = 20140405If date-to-check > fromdateand date-to-check < thrudate       perform xxxxxxwhy doesn't that work?  I don't understand the problem. 
    260 pointsBadges:
    report
  • LetItBe
    If it is because you are comparing yyyymmdd to a date range in ddmmyyyy format - then you need to make the dates a compatible format in working storage.  Convert 01012012 to 20120101 and 05042014 to 20140504 - then a comparing to a yyyymmdd value will work.
    260 pointsBadges:
    report
  • TomLiotta
    I have date in yyyymmdd format.   Does that mean it's not a DATE, but it's a character or numeric variable instead? If so, then you need to convert it to a DATE or convert your DATE values to match the variable type.   ...the intrinsic function like that in COBOL are not working...   Which function? If we don't know the function, we can't help with any errors.   What does your programming look like? We can't tell what might be wrong if we can't look at it. We need to see the instructions together with any related data definitions.   Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following