read .DAT files and build table