Creating Multiple Observations from a Single Record |
Reading Repeating Blocks of Data |
This example requires only one INPUT statement to read the
values for Date and HighTemp , but the INPUT statement
must execute three times for each record.
The INPUT statement reads a block of values for |
data perm.april90; infile tempdata; input Date : date. HighTemp @@; |
Raw Data File Tempdata
1---+----1V---+----20---+----30--
01APR90 68 02APR90 67 03APR90 70
04APR90 74 05APR90 72 06APR90 73
07APR90 71 08APR90 75 09APR90 76
In the next iteration, the INPUT statement reads the next
block of values for Date and HighTemp from the same
record. |
1---+----10---+----2V---+----30-- |
01APR90 68 02APR90 67 03APR90 70 |
04APR90 74 05APR90 72 06APR90 73 |
07APR90 71 08APR90 75 09APR90 76 |
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.