Comparing 2 files on the basis of Date
Posted: Mon Feb 27, 2012 7:47 pm
Hi,
I've been banging my head on this. It would be great if anyone could help. Note - I have to use ICETOOL/DFSORT to get the below result.
I have 2 files -
F1 - LRECL=100,RECFM=FB with date field in the form of YYYY-MM-DD(10 bytes) starting at position 15 (15-24).
F2 - LRECL=80,RECFM=FB. This is a date file with only one record. First 10 bytes being the current batch date and the enxte 10 bytes (11-20) being the previous batch date. Format of dates - YYYY-MM-DD.
I want to retrieve the first 14 bytes from all the records in F1 where the date (15-24) is less than or equal to the previous date in F2(11-20).
It would be great if anyone could help me on an urgent basis.
Let me know if any more details are required.
Thanks
Rajat Kharbanda
I've been banging my head on this. It would be great if anyone could help. Note - I have to use ICETOOL/DFSORT to get the below result.
I have 2 files -
F1 - LRECL=100,RECFM=FB with date field in the form of YYYY-MM-DD(10 bytes) starting at position 15 (15-24).
F2 - LRECL=80,RECFM=FB. This is a date file with only one record. First 10 bytes being the current batch date and the enxte 10 bytes (11-20) being the previous batch date. Format of dates - YYYY-MM-DD.
I want to retrieve the first 14 bytes from all the records in F1 where the date (15-24) is less than or equal to the previous date in F2(11-20).
It would be great if anyone could help me on an urgent basis.
Let me know if any more details are required.
Thanks
Rajat Kharbanda