SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Creating Multiple Observations from a Single Record
Reading a Varying Number of Repeating Fields


Question:

Notice the position of the input pointer. What happens when the second INPUT statement executes?
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;
Raw Data File Data97
1---+----10--+----20--V+----30---+----40-
1824 1,323.34 2,472.85
1943 1,908.34

The input pointer moves down to the next record to find a value for Sales.
Sales is set to missing.


  back||next

 

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

Terms of Use & Legal Information | Privacy Statement