You don't give any indication of the format of the individual files - IMO, other than
jetteros earlier suggestion (of using a hash), the easiest solution, subject to you having any say and a suitable format, would be to
do each file - thereby satisfying both of the principle requirements since...
- All variables in the last file would be updated as a result of doing the last file
- Assuming the requirement for an index of the record is to access its' value, the value [of the variable] would be accessed by accessing the variable itself
A user level that continues to overstate my experience :-))