LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2005, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments:   To: omugeye <bhuta_zegha@YAHOO.COM>
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.


Back to: Top of message | Previous page | Main SAS-L page