Hi,
Please see my requirements below:
1. I need to sort a file based on a key of 5 byte length.
2. In case there are records with duplicate keys I need to retain the one which has the most recent date-time stamp.
For example
11111 20110509 01:14:56
11111 20110509 02:00:00
22222 20110508 01:30:30
22222 20110509 07:15:00
33333 20110509 08:00:00
44444 20110509 09:00:00
Output File should be
11111 20110509 02:00:00
22222 20110509 07:15:00
33333 20110509 08:00:00
44444 20110509 09:00:00
The date and time fields are actually packed decimal fields,but in the example above i have mentioned it differently
for illustration purposes.
The Input File record length is 1000
Key position - 1; length 5 bytes
Date position - 6; packed decimal 9(09)
Time position - 11; packed decimal 9(09)
Can someone can suggest me how to achieve this using a single SORT card. I know we can achieve this using ICETOOL but I would
prefer if we did it using just DFSORT.
Please let me know if you need some more clarifications.
Thanks,
Drucky