Try this: data cencty; infile '$HOME/sascommunity/cencty.txt' truncover lrecl=100; length inp_line $ 100; input; inp_line = _infile_; *have to do this, or the first 2 blanks are eaten; *expand the tabs; i = indexc(inp_line,byte(9)); do while (i ne 0); x = mod(i-1,8); inp_line = substr(inp_line,1,i-1) !! repeat(' ',7-x) !! substr(inp_line,i+1); i = indexc(inp_line,byte(9)); end; area = substr(inp_line,1,48); cmsa = substr(inp_line,49,4); pmsa = substr(inp_line,57,4); cm = substr(inp_line,65,2); ss = substr(inp_line,73,2); eeeee = substr(inp_line,81,5); drop i x inp_line; run; You may want do some grouping along the cmsa-level cities
... View more