I have the following three data steps, each of which reads in two variables from the embedded raw data. The two variables are separated by THREE spaces in all cases. See SAS code below:
data Char;
input name $ +2 income comma5.;
datalines;
Tom 1,098
;
run;
data Num;
input id +2 income comma5.;
datalines;
123 1,098
;
run;
data Informat;
input balance comma5. +3 income comma5.;
datalines;
5,123 1,098
;
run;
As you can see, for the char and numeric variables, I need to do a +2 on the input pointer for the following informat to work; however, if the first variable uses an informat, it needs a +3 on the pointer. Can someone please explain this difference of pointer position?