SAS software provides two line-hold specifiers. |
The term trailing indicates that the @ or @@ must be the last item specified in the INPUT statement, as shown in this example: input name $20. @; or input name $20. @@; It's easy to distinguish between @ and @@ by remembering that
|
Trailing At Sign (@) |
Normally, each INPUT statement in a DATA step reads from a new record. But
when you use the @, the following occurs:
|
data perm.dataset; infile rawdata; input id 3. @; . . . input activity $; |
|
|
data perm.dataset; infile rawdata; input id 3. @; . . . input activity $; |
|
A record held by the trailing @ is automatically released
when
|
data perm.dataset; infile rawdata; input id 3. @; . . . input activity $; |
|
|
data perm.dataset; infile rawdata; input id 3. @; . . . run; |
Double Trailing At Sign (@@) |
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; |
|
input score @@; |
|
A record held by the double trailing at sign (@@) is not
released until
input id 4. @@; . . input department 5.; |