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?
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.