Page 1 of 1

Date logic in COBOL

PostPosted: Wed Feb 03, 2010 6:11 pm
by Ranjana
Hi,

I have below requirement,
Get an input file which is having records along with dates in format CYYMMDD.Also we have from and to date from the job PARM.
Need to fetch an records which is falling between from and to dates.

Example:

Input file
Record1 mainframe forum 1 1090324
Record2 mainframe forum 3 1040523
Record3 mainframe forum 2 0960324

Date in Parm:
10405231090426
CYYMMDDCYYMMDD (From date and to date)

Outputfile:
Record1 mainframe forum 1 1090324
Record2 mainframe forum 3 1040523

Please let me know how to find that the date in the input file is falling between the dates from PARM.

Thanks,
Ranjana

Re: Date logic in COBOL

PostPosted: Wed Feb 03, 2010 6:59 pm
by Robert Sample
I recommend you find a copy of the COBOL Language Reference manual (if nowhere else, you can find one at http://www.s390.ibm.com) and look up the IF statement.

And this type of forum works best on very specific questions, not the wide-open question you asked. Once you've read about the IF statement, and you are having a specific problem with coding, that would be the time to post a question.