The single @ is temporary, for the current iteration of the DATA step only.
The double is permanent. The only way to get to the next line includes:
The single @ is temporary, for the current iteration of the DATA step only.
The double is permanent. The only way to get to the next line includes:
Why not play with it and see what happens?
data test1;
interation+1;
do col=1 to 3 ;
input x @;
output;
end;
cards;
1 2 3 4 5 6
7 8 9 10 11 12
;
proc print;
run;
data test2;
interation+1;
do col=1 to 3 ;
input x @@;
output;
end;
cards;
1 2 3 4 5 6
7 8 9 10 11 12
;
proc print;
run;
A SINGLE trailing "@" holds the input buffer only for the current iteration of the data step (i.e, til processing returns to the top of the data step), or is passed a subsequent INPUT statement without a trailing "@".
A DOUBLE trailing "@" holds the input buffer indefinitely (i.e, multiple iterations of the data step) as long as there is data in the input buffer to read.
Hope that helps?
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.