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 (September 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 19 Sep 2007 16:13:17 -0000
Reply-To:     Perry <jasper6294@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Perry <jasper6294@GMAIL.COM>
Organization: http://groups.google.com
Subject:      Re: length option in the infile statement??
Comments: To: sas-l@uga.edu
In-Reply-To:  <1190217916.713121.186300@19g2000hsx.googlegroups.com>
Content-Type: text/plain; charset="us-ascii"

What, specifically, is your goal? Perhaps you do need the length= option, but from your example I can't tell why.

>From the docs... "names a variable that SAS sets to the length of the current input line. SAS does not assign the variable a value until an INPUT statement executes. Like automatic variables, the LENGTH= variable is not written to the data set. "

If you could describe the situation a little more, I'm sure that many solutions to your problem will be offered quite quickly.

On Sep 19, 12:05 pm, adac1...@gmail.com wrote: > May I know can we use length= in the infile statement? and what is > value we are expecting to use for? > > filename in '/home/tst.lst'; > data tmp; > infile in length=linel; > input xname $5. linel; > > ( tst.lst looked like this > name1 > name2 > name3 > name4 > ) > > I tested but came out the linexx value were shown . (missing) except > the last observation- linexx=0 and error encountere > > log msg: > linel=. xname=name1 _ERROR_=1 _N_=1 > linel=. xname=name2 _ERROR_=1 _N_=2 > linel=. xname=name3 _ERROR_=1 _N_=3 > inel=0 xname=name4 _ERROR_=1 _N_=4 > > why the last observation with linexx=0? > > Thanks,


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