SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

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


Holding the Current Record With a Line-Hold Specifier

As you begin to write the INPUT statement, you need to hold the current record until each block of data has been read and written to the data set as an observation. This is easily accomplished by using a line-hold specifier in the INPUT statement.

The SAS System provides two line-hold specifiers.

  • The trailing @ enables the next INPUT statement to read from the current record in the same iteration of the DATA step.

  • The double trailing at sign (@@) enables the next INPUT statement to read from the current record across further iterations of the DATA step.

The term trailing indicates that the @ or @@ must be the last item specified in the INPUT statement. For example,

     input name $20. @;     or     input name $20. @@;
This lesson teaches you how the @@ can be used to hold a record across further iterations of the DATA step. Later, you'll learn how to use the @ to hold a record for another INPUT statement.


back||next


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

Terms of Use & Legal Information | Privacy Statement