SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Creating Multiple Observations from a Single Record
Reading Repeating Blocks of Data


Using the Double Trailing At Sign (@@) to Hold the Current Record

Normally, each time a DATA step executes, the INPUT statement reads a new record. But when you use the @@, the INPUT statement holds the current record and reads the next value.

input score;
1---+----10---+-
102 92 78 103
84 23 36 75
Program Data Vector

input score @@;
1---+----10---+-
102 92 78 103
84 23 36 75
Program Data Vector


A record held by the double trailing at sign (@@) is not released until

  • the input pointer moves past the end of the record. Then the input pointer moves down to the next record.
1---+----10--V+-
102 92 78 103
84 23 36 75
 
  • an INPUT statement without a line-hold specifier executes.
input ID $4. @@;
.
.     
input Department 5.;


back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement