Date: Sun, 15 Jul 2001 17:21:21 GMT
Reply-To: lebeau <lebeau777@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: lebeau <lebeau777@HOTMAIL.COM>
Organization: Excite@Home - The Leader in Broadband http://home.com/faster
Subject: reading in a record with undetermined lines
I need to read in records that don't all have the same number of variables
over more than 1 line. Each variable has a label and a new record should
starts when I read a certain variable (Cust :)
Cust : John
Acct : 111
Amt : $150
Amt2 : $40
Cust : Jeff
Acct : 458
Amt : $450
Cust : Kim
Acct : 784
Amt : $214
Amt2 : $54
Problem is if I read in like:
input @11 var1 $5 /
@11 var2 $5 /
@11 var3 $5 /
@11 var4 $5 ;
I lose the Kim record because it only has 3 variables to the record.
Anything I try I lose records.
Question is, how do you read in the records to make a one line per record
flat file when you don't know how many lines a record (in the input file).
Each record begins with Cust : .