Indeed, @ points to a column of text, not a separator column. The only method using standard input that I ever found was to read in an empty state, i.e.
input id blank $ blank $ blank $ name $ ;
and then leave it blank.
However, there is a better solution if you do not mind writing your input in different ways.
data tmp; infile datalines; input @; id = scan(_INFILE_,1,','); name = scan(_INFILE_,5,','); put _all_; datalines; 12345,x,y,z,Joe 12346,x,y,z,Bob ;;;; run;
This makes formatting a little more messy, since you need to enter or enter statements for each variable that you don't want in the base character format, but it can be simpler depending on your needs.
source share