SAS and text pointers - not reading all values -
data test; infile datalines missover; input @ "r1" r1 @ "r2" r2 @ "r3" r3 @ "r4" r4; datalines; r4 34 r2 21 r3 r1 12 r4 12 r2 19 r3 r1 76 ; run;
why in test
data set values of r1
, rest .
?
my desired output is:
r1 r2 r3 r4 -------------------- 12 21 . 34 76 19 . 12
after reading example in sas documentation found solution:
data test; infile datalines missover; input @'r1' r1 @1 @'r2' r2 @1 @'r3' r3 @1 @'r4' r4; datalines; r4 34 r2 21 r3 r1 12 r4 12 r2 19 r3 r1 76 ; run;
it needed go beginnig of line @1
because without sas keeps searching given strings last pointer location.
Comments
Post a Comment