Creating Multiple Observations from a Single Record |
Reading a Varying Number of Repeating Fields
![]() |
Completing the DO WHILE Loop
Now look at the other statements that should be executed in the DO WHILE
loop. First, you need an OUTPUT statement to write the current observation
to the data set. Then, another INPUT statement reads the next value for
|
data perm.sales97; infile data97 missover; input ID $4. Sales : comma. @; Quarter=0; do while (sales ne .); quarter+1; output; input sales : comma. @; end; run; |
![]() ![]() ![]() ![]() ![]() ![]() |
|
![]() |
![]() |
Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.