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 (December 2002, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 11 Dec 2002 13:41:50 -0500
Reply-To:     Ian Whitlock <WHITLOI1@WESTAT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ian Whitlock <WHITLOI1@WESTAT.COM>
Subject:      Re: recruiting cheesy, sleasy SAS tricks
Comments: To: Larry Bertolini <bertolini.1@OSU.EDU>
Comments: cc: "michael@BASSETTCONSULTING.COM" <michael@BASSETTCONSULTING.COM>,
          "myr_rose@YAHOO.COM" <myr_rose@YAHOO.COM>
Content-Type: text/plain; charset="iso-8859-1"

Larry,

Leave a little room for sleaze here. I don't know about the two bytes, but I often use

infile in lrecl = 32767 ;

when too impatient or unable to calculate and have never run into a problem or noticed any degradation of performance. I guess it chews up some memory, but so far not in a way that I have had to care about. Perhaps some operating systems will extract a cost that would put this in the category of a bad habit. I suspect the real importance of the LRECL specification comes from the dinosaur days when it determined the record in a fixed block segment.

IanWhitlock@westat.com

-----Original Message----- From: Larry Bertolini [mailto:bertolini.1@OSU.EDU] Sent: Wednesday, December 11, 2002 1:07 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: how to input a long var into SAS without missing any words

Rose wrote:

> Greetings to all, > > I tried to input a tab delimited file into SAS by using infile > statement: > > filename one "d:"; > data aa; > infile one firstobs=2 dlm='09'x missover dsd lrecl=400; > length char $400; > input char $ aa $ bb $; > run; > > since the var char is long, so I use the lrecl option, and try to > input it completely, > but there is always a word missing whatever I use lrecl=256 or > lrecl=400, they are the same result. >

If variable "char" can be up to 400 bytes, can we assume that the maximum record length could be >400? Try specifying an LRECL that is the sum of: max length of each variable + number of delimiters + 2 (For CR-LF; don't know if it's necessary, but if it's an extravagance, it's a small one. Right now, I don't have time to prove/disprove it's necessity.)

I suggest that you also specify a length for variables "aa" and "bb".

> > do you know how to input a long var into SAS without missing any > words? > > thanks advance. > > Rose


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