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>
Subject: Re: length option in the infile statement??
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
> 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?