Date: Wed, 23 Feb 2005 10:34:18 -0800
Reply-To: Dennis Diskin <diskin@SNET.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Dennis Diskin <diskin@SNET.NET>
Subject: Re: Reading ASCI text file
In-Reply-To: <1109181427.735985.153510@f14g2000cwb.googlegroups.com>
Content-Type: text/plain; charset=us-ascii
Use the @ line-holder control:
%let nn = 12);
data a;
array vars(12);
input ID kount;
drop i;
do i = 1 to kount;
input vars(i) @;
end;
cards;
1001 2
999 888
1007 8
111 222 333 444 555 666 777 888
1002 5
987 876 765 654 543
;
run;
HTH,
Dennis Diskin
omugeye <bhuta_zegha@YAHOO.COM> wrote:
I have a text file that goes over two lines like:
ID kount
1001 2
999 888
1007 8
111 222 333 444 555 666 777 888
1002 5
987 876 765 654 543
.
.
.
I would the SAS data file to be like:
id count var1-var(Kount)
1001 2 999 888 . . . . .
1007 8 111 222 333 444 555 666 777 888
1002 5 999 888 777 666 555 . . .
I do not know maximum kount. It needs to be determined dynamically.
All help appreciated.