One @ sign means conditional input. That is, the data record from the raw data will be saved in the input buffer and will not be saved to the corresponding variable. Only when the second "input" statement is encountered can the raw data be read into the SAS data set.
For double @@, sometimes each line of the raw data is longer than the size of SAS input variables, and the input will only stop once the end of line is encountered in the raw data set. For example,
data example input group $ score @@; datalines; 1 100 1 200 1 300 2 120 2 210 2 320 3 310 3 420 3 540; run;
proc print; run;
In the example above you need to use double trailing @@ sign since each row of the embedded data has three observations
data NYC;
input city $ 18-32 @;
if city='New York';
input FLNO 1-4 AirLine $6-18 city $ 18-32 Time $34-40;
cards;
9238 American New York 10:00
4235 United Philadelphia 5:00pm
798 Delta New York 8:50
4824 North West Houston 12:30pm
1639 South West Chicago 4:15pm
5417 North West New York 11:25
;
run;
Proc print data=NYC;
title 'Flight to New York City';
run;
the new data set will only take records which have City = "New York" and discard the rest. @ means the program will put the input process on hold to make the conditional assessment.
the difference is how long they hold a line of data for input. The trailing @ holds a line of data for subsequent INPUT statements, but releases that line of data when SAS returns to the top of the DATA step to begin building the next observation. The double trailing @ holds a line of data for subsequent INPUT statements even when SAS starts building a new observation. In both cases, the line of data is released if SAS
reaches a subsequent INPUT statement that does not contain a line-hold specifier.
Sometimes you need to move the pointer explicitly, and you can do that by using the column
pointer, @n, where n is the number of the column SAS should move to.
In the preceding program (INPUT ParkName $ 1-22 State $ Year @40 Acreage COMMA9.;), the column pointer @40 tells SAS to move to column 40 before reading
the value for Acreage.