I've two sequential file of LRECL=80. Each file will always have one record with 'any possible' valid date on it from Col 1 to 8 in YYYYMMDD format. I just need to compare 'month' portion of each dates and set return codes. Possibly two return codes - one for same month scenario or another for different months scenario
Case-1
For example FileOne and FileTwo have following date records. This case month is same and so set return code, say RC=0.
FileOne
20110301
FileTwo
20110331
Case-2
For example FileOne and FileTwo have following date records. This case month is different and so set a different return code, say RC=4.
FileOne
20110301
FileTwo
20110401
I wish I could get this done in SORT rather than writing a new program to do this.
Could someone please suggest a simplest and best way in SORT resulting into 'single JCL step' if possible?
FYI...I would verify these return codes in downstream steps of JCL to perform business processing depends on how RC is. Let's not worry about business processing now.
Thank you gcicchet and saiprasadh. The suggested code worked well for me. This is the best and smartest way than writing via programming. You guys are amazing. Thanks again for your help and support.