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 2007, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 1 Aug 2007 23:21:53 -0400
Reply-To:     "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Subject:      Re: It is very very simple question reading data in sas

On Wed, 1 Aug 2007 09:39:03 -0000, reddy <mail2karna@GMAIL.COM> wrote:

>I have two variables name and age. > > data is > >cards; >ffc ffc ffc 23 >ksds 24 >dsfasdfsdf 34 >ss ss ss 45 >; > >i want output like this > > > > name age > >ffc ffc ffc 23 > >ksds 24 > >dsfasdfsdf 34 > >ss ss ss 45 > > >could u please help any one > >Thanks in advance > >s.karunakar >Mail: mail2karna@gmail.com

How do you know it is "simple"?

You have received a couple of solutions which may work for the example, but which are not very general. If there were more fields, especially character fields, this would be very difficult.

It is unreasonable to have spaces embedded in a field and also use the space as delimiter. Your file is under-punctuated.

SAS does have a convention which can be used. Use *two or more* blanks between fields, and code the "&" modifier in the INPUT statement.


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