Date: Thu, 8 Nov 2007 13:29:16 -0700
Reply-To: Jerry L Diebal <jdiebal@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jerry L Diebal <jdiebal@GMAIL.COM>
Subject: input or list question on reading in a text file?
Content-Type: text/plain; charset=ISO-8859-1
I have a file that has data like what is in the cards datastep below:
/**********************************/
data test;
input datastuff $ ;
keep datastuff ;
cards;
111111-911
000111111
000038
NAME OF CITY
2
0
10/31/2007
28
C45
222222-911
000222222
000038
NAME OF CITY
2
0
10/31/2007
28
C46
333333-911
000333333
000038
NAME OF CITY
2
0
10/31/2007
28
C47
;
/*********************************************/
Each record consists of 9 lines like in the sample and each is
separated by a blank line. The leading zeroes need to be retained on
any variable starting with a zero. Can someone show me how to turn the
above into a dataset? Thanks in advance.