Creating Multiple Observations from a Single Record |
Reading the Same Number of Repeating Fields
|
Using the Single Trailing At Sign (@) to Hold the
Current Record
First, you need to read the value for |
data perm.sales97; infile data97; input ID $4. |
Raw Data File Data97
1---V----10---+----20---+----30---+----40
0734 1,323.34 2,472.85 3,276.65 5,345.52
0943 1,908.34 2,560.38 3,472.09 5,290.86
1009 2,934.12 3,308.41 4,176.18 7,581.81
You are already familiar with the @@, which holds the current
record across iterations of the DATA step.
However, in this case, you want to hold the record with the @ line hold
specifier, so that a second INPUT statement can read the values for
|
|
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.