INPUT FILE1 :
SSN Plan Eligible Date Term_date
1234567890 844 20080101 20081212
1234567890 845 20081213 20081231
SSN PLAN WEEKEND DATE AMOUNT
1234567890 845 20080107 240.0
1234567890 845 20080114 140.0
1234567890 845 20081212 200.0
Now I need to sum the amount for a particular plan using eligible and termdate from first file and need to add amount from second file for same by validating date is in valid range of eligible and term-date.
Please show your expected output records for your input example, and explain the "rules" for getting from input to output in terms of your example. If there are cases not illustrated by your example, add those cases to the example. Give the RECFM and LRECL of each input file. Give the starting position, length and format of each relevant field.