LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (October 2007, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 5 Oct 2007 15:21:16 +0000
Reply-To:     toby dunn <tobydunn@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         toby dunn <tobydunn@HOTMAIL.COM>
Subject:      Re: Comma separated
Comments: To: Val Krem <valkrem@yahoo.com>
In-Reply-To:  <128350.21823.qm@web63611.mail.re1.yahoo.com>
Content-Type: text/plain; charset="Windows-1252"

Data Need ( Keep = Var1 Var3 ) ; Length Var1 $ 200 ; Infile MyFile DLM = ',' ; Input Var1 Var2 Var3 Var4 Var5 Var6 ; Run ;

Or < Untested>

Data Need ( Drop = Temp ) ; Length Var1 $ 200 ; Infile MyFile DLM = ',' ;

Input @ ;

Temp = CatS( Scan( _Infile_ , 1 , ',' ) , Scan( _Infile_ , 3 , ',' ) ) ; _InFile_ = Temp ;

Input Var1 Var3 ;

Run ;

Toby Dunn

Compromise is like telling a lie, it gets easier and easier. Each compromise you make, that becomes your standard.

Perfection doesnt exist, once you reach it, its not perfect anymore. It means something else.

> Date: Fri, 5 Oct 2007 08:08:10 -0700 > From: valkrem@YAHOO.COM > Subject: Comma separated > To: SAS-L@LISTSERV.UGA.EDU > > Dear SAS users, > > I want read a data file that is separated by commas > > Example- the following data file have 6 varaibles, > > TYG123, 435, 22334, 46, 123234, 670005 > > > > The variables may not have the same length. The first variable is always Character and the other variables are numeric. > > How can I read them? > > I may want to read only some variables. eg. variable 1, and variable 3. > > Any help is highly appreciated. > > > Val. > > > --------------------------------- > Need a vacation? Get great deals to amazing places on Yahoo! Travel.

_________________________________________________________________ Windows Live Hotmail and Microsoft Office Outlook – together at last. Get it now. http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033


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