Hey guys,
I am trying to understand the difference between @ and @@. For the data below both works.So whats the diff and why do we need another @ (input sales :comma.)to read the data below...(Is there a simple way to solve problems with single and double trailing)
DATA
0734 1,323.34 2,472.85 3,276.65
0987 1,393.34 9,472.85 2,276.65
*Problem_1;
data Single;
infile test;
input id $ @@; *Double trailing works;
do qtr = 1 to 3;
input sales :comma.@; *Why single trailing here;
output;
end;
run;
*Problem_2;
data Single;
infile test;
input id $ @; *Single trailing works;
do qtr = 1 to 3;
input sales :comma.@; *Why single trailing here;
output;
end;
run;
I am trying to understand the difference between @ and @@. For the data below both works.So whats the diff and why do we need another @ (input sales :comma.)to read the data below...(Is there a simple way to solve problems with single and double trailing)
DATA
0734 1,323.34 2,472.85 3,276.65
0987 1,393.34 9,472.85 2,276.65
*Problem_1;
data Single;
infile test;
input id $ @@; *Double trailing works;
do qtr = 1 to 3;
input sales :comma.@; *Why single trailing here;
output;
end;
run;
*Problem_2;
data Single;
infile test;
input id $ @; *Single trailing works;
do qtr = 1 to 3;
input sales :comma.@; *Why single trailing here;
output;
end;
run;