Here is how it works. The datastep reads in the file data.txt, which we are saying is space delimited. It then reads the first variable into name. The @@ says don't go to the next line yet. SAS doesn't have an isnumeric function, so we test it by removing the numbers with compress and seeing if we changed it. If not, then we read in the rest of the variables (the / says go to the next line for the rest of the variables).
Not sure what you mean by the first 5 observations of each line. The data step has a built in loop, so you won't need a do loop. Do you mean you want to read in only 5 records total?
Christopher Johnson
www.codeitmagazine.com