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 (July 2011, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 29 Jul 2011 13:06:13 -0400
Reply-To:   "Kirby, Ted" <ted.kirby@LEWIN.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Kirby, Ted" <ted.kirby@LEWIN.COM>
Subject:   SAS-L Attachment (was RE: Questions about infile)
Content-Type:   text/plain; charset="us-ascii"

The sample text file was attached to the message in my e-mail. I wonder how that happened?

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Bian, Haikuo Sent: Friday, July 29, 2011 11:28 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Questions about infile

It would be easier if your raw data can be input using column input:

The content of sample text file (shamelessly grabbed from SAS_L):

1001 M 1 23 24 1001 F 1 41 29 1001 M 2 34 15 1001 F 2 30 54

The code:

filename test "c:\temp\test.txt";

data want; infile test; input sex $ 10-10 @; if sex='F'; input patid $ 1-4 day 16-16 aci 23-24 erm 28-29; run;

proc print;run;

Doing so avoids reading in unwanted data. Since SAS_L does not allow attachment, the sample text file will only be available to OP.

HTH, Haikuo

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Fangfang Sun Sent: Friday, July 29, 2011 9:56 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Questions about infile

Hello, everyone,

I need to read external raw data files to SAS using infile, but I donot want to read in all raw data. For example, for SAS datesets, we have:

data a; set b(where=(gender in ("F")));

Are there any statements or options, similar as "where", for infile?

Thanks!

Fangfang Sun

----------------------------------------- Email messages cannot be guaranteed to be secure or error-free as transmitted information can be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The Centers for Medicare & Medicaid Services therefore does not accept liability for any error or omissions in the contents of this message, which arise as a result of email transmission.

CONFIDENTIALITY NOTICE: This communication, including any attachments, may contain confidential information and is intended only for the individual or entity to which it is addressed. Any review, dissemination, or copying of this communication by anyone other than the intended recipient is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and delete and destroy all copies of the original message. ************* IMPORTANT - PLEASE READ ********************

This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately.


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