I have a big text file and it contains 3 tables. The records in the file are unsorted, the records in the file are in line with the column name separated by space. The tables are repeating themselves until the end. I want to import the data from that notepad file under correct table into SAS. I want to read the records and column names from the text file and put them under correct table In SAS. I tried through INFILE and I was successful in importing the data into SAS, but since Columns are unsorted and tables are repeating themselves therefore it is harder to keep the records under correct table in SAS. I am a beginner to SAS, any help would be greatly appreciated.
The below is the example of data in the text file
ABCD - ABCD ---- Table 1
Column1 xxxxxxxxxxxxxxxxxxx Column3 xxxxxxxxxxxx
Column2 x Column4 xx
ABCD - ABCD ---- Table 2
Column1 xxxxxxxxxxxxxxxxxxx Column3 xxxxxxxxxxx
Column2 x Column4 xx
ABCD - ABCD ---- Table 3
Column1 xxxxxxxxxxxxxxxxxxx Column3 xxxxxxxxxxxxxxx
Column2 x Column4 xx
ABCD - ABCD ---- Table 1
Column1 xxxxxxxxxxxxxxxxxxx Column3 xxxxxxxxxxxxxx
Column2 x Column4 xx
ABCD - ABCD ---- Table 2
Column1 xxxxxxxxxxxxxxxxxxx Column3 xxxxxxxxxxxxxxxxxx
Column2 x Column4 xx
ABCD - ABCD ---- Table 3
Column1 xxxxxxxxxxxxxxxxxxx Column3 xxxxxxxxxxxxxxxxxxxx
Column2 x Column4 xx