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 (August 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 16 Aug 2006 20:44:42 -0700
Reply-To:   Jun <junliu2004@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Jun <junliu2004@GMAIL.COM>
Organization:   http://groups.google.com
Subject:   How to read this text file into SAS dataset.Any suggestion will be appreciated.
Comments:   To: sas-l@uga.edu
Content-Type:   text/plain; charset="iso-8859-1"

Dear All:

I have several text files. All these files contains titles and a table. I just want to read in the numbers appeared in the table (not include the number appeared in title and in the table row name and column name) into a SAS dataset. In the SAS dataset, I want to have three columns, the first column indicates at which column a particular number appeared in the old table, the second column indicates at which row a particular number appeared in the old table, the third column is the number. The following is one sample of the text file. Any suggestion will be appreciated.

title

---------------------------------------------------------------------------

column1 ----column2--- ---column3----- n % n %

---------------------------------------------------------------------------- AAAA 22 10.2 100 100 BBBB 33 12.2 1200 23 CCCC 55 8.9 42 0.3

---------------------------------------------------------------------------

The sas dataset I want to create for the above example is as follows:

1 1 22 1 2 33 1 3 55 2 1 10.2 2 2 12.2 2 3 8.9 3 1 100 3 2 1200 3 3 42 4 1 100 4 2 23 4 3 0.3

Thanks, Jun


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