I am having a requirement comparing two files. 1st file having 10 records and 2nd file having one record with one field only. In both the files date field is the key(date-1 in first file and date-2 in 2nd file). I want to select all the records from the first file for date-1 in file-1 is less than or equals to date-2 in file-2. Can i do this using syncsort.
I have tried with joinkeys but that only works for matched or unmatched records and i can't check "less than or equals to" condition
sample sort code i have tried-
if i can get the output as "rec-1 from 1st file and the date-2 field from file-2 appended towards the end of file-1 then i can get the required result. The problem is with file-2 having one record.
without joinkeys can i format the data in two files to the format as "rec-1 from file-1 with the date-2 field appended at the end of each record.
here are the sample file formats.
file-1 (4 records) file-2 (1 record)
111 2010-06-13 AAA 2010-06-16
112 2010-06-18 BBB
113 2010-06-16 CCC
114 2010-06-19 DDD