Date: Fri, 15 Mar 2002 09:31:11 -0600
Reply-To: Gregg Snell <gsnell@DATASAVANTCONSULTING.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gregg Snell <gsnell@DATASAVANTCONSULTING.COM>
Subject: Re: Record Length
Content-Type: text/plain; charset="iso-8859-1"
Tom,
This may be an IML thing as the following works just fine inside a data
_null_;
file 'out' lrecl = 800 recfm=f;
Gregg P. Snell
Data Savant Consulting
(913) 638-4640
(208) 977-1943 fax
http://www.datasavantconsulting.com
"Thomas Allen Schmitt" <schmitta@CSD.UWM.EDU> wrote in message
news:Pine.OSF.3.96.1020315090431.2516A-100000@alpha2.csd.uwm.edu...
> Gregg, how do you add it? I wrote it like "file 'toms' recfm=f
> lrecl=800;" and got the error messge "ERROR 22-322: Syntax error,
> expecting one of the following: N, U."
>
> Jim, I did put it outside the loops after the data step and got "ERROR: No
> current file to write to." I get no warnings or errors when I place it
> within IML, but it does not increase the record length.
>
> Tom
>
>
>
>
>
> > The only other thing I could suggest is to add "recfm=f" to your file
statement. That should force it to your lrecl regardless of what you write
to it.
> > ----- Original Message -----
> > From: Gregg Snell
> > To: Thomas Allen Schmitt
> > Sent: Friday, March 15, 2002 7:51 AM
> > Subject: Re: Record Length
> >
> >
> > Tom,
> >
> > Have you tried moving the "file" statement out of the do loops?
> >
> > Gregg P. Snell
> > Data Savant Consulting
> > (913) 638-4640
> > (208) 977-1943 fax
> > http://www.datasavantconsulting.com
> >
> >
> > "Thomas Allen Schmitt" <schmitta@CSD.UWM.EDU> wrote in message
news:Pine.OSF.3.96.1020315072800.7314A-100000@alpha2.csd.uwm.edu...
> > > Hey Jim thanks for the programming advice Jim. I've tried several
> > > different names, but with no luck or change in the warning message.
> > >
> > > Tom
> > >
> > > > Hi Tom,
> > > >
> > > > Maybe the file out is open by another program. Check it.
> > > >
> > > > An advice on your multitude of IF statements: make them all ELSE
IF, except
> > > > for the first one of course. Even better replace all 66 of them by
the
> > > > single
> > > > PUT @(1+(t-1)*10) var @;
> > > >
> > > > Regards - Jim.
> > > > --
> > > > Y. (Jim) Groeneveld, MSc IMRO TRAMARKO tel. +31 412 407
070
> > > > senior statistician, P.O. Box 1 fax. +31 412 407
080
> > > > senior data manager 5350 AA BERGHEM IMRO TRAMARKO: a
CRO
> > > > J.Groeneveld@ITGroups.com the Netherlands in clinical
research
> > > >
> > > > My computer beeps when it complains; I complain when it beeps
> > > >
> > > > Notice of confidentiality: this e-mail may contain confidential
information
> > > > intended for the addressed recipient only.
> > > > If you have received this e-mail in error please delete this
e-mail and
> > > > please notify the sender so that proper delivery
> > > > can be arranged.
> > > >
> > > > > -----Original Message-----
> > > > > From: Thomas Allen Schmitt [SMTP:schmitta@CSD.UWM.EDU]
> > > > > Sent: Thursday, March 14, 2002 9:43 PM
> > > > > To: SAS-L@LISTSERV.UGA.EDU
> > > > > Subject: Record Length
> > > > >
> > > > > I'm tying to change the record length so I can read the
variables across.
> > > > > I get the warning at the end of the file and it
> > > > > does not change the record length. Any suggestions for the
placement of
> > > > > the logical record length option. I also tried the
> > > > > LINESIZE option but that didn't work at all. I'm not very clear
on how to
> > > > > use each or the difference between the two.
> > > > >
> > > > > Tom
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > do i = 1 to 2;
> > > > > do t = 1 to 66;
> > > > > do z = 1 to 30;
> > > > > */ calculations for var /*;
> > > > > end;
> > > > > file 'out' lrecl = 800;
> > > > > if t = 1 then put @1 var @;
> > > > > if t = 2 then put @11 var @;
> > > > > if t = 3 then put @21 var @;
> > > > > if t = 4 then put @31 var @;
> > > > > if t = 5 then put @41 var @;
> > > > > if t = 6 then put @51 var @;
> > > > > if t = 7 then put @61 var @;
> > > > > if t = 8 then put @71 var @;
> > > > > if t = 9 then put @81 var @;
> > > > > if t = 10 then put @91 var @;
> > > > > if t = 11 then put @101 var @;
> > > > > if t = 12 then put @111 var @;
> > > > > if t = 13 then put @121 var @;
> > > > > if t = 14 then put @131 var @;
> > > > > if t = 15 then put @141 var @;
> > > > > if t = 16 then put @151 var @;
> > > > > if t = 17 then put @161 var @;
> > > > > if t = 18 then put @171 var @;
> > > > > if t = 19 then put @181 var @;
> > > > > if t = 20 then put @191 var @;
> > > > > if t = 21 then put @201 var @;
> > > > > if t = 22 then put @211 var @;
> > > > > if t = 23 then put @221 var @;
> > > > > if t = 24 then put @231 var @;
> > > > > if t = 25 then put @241 var @;
> > > > > if t = 26 then put @251 var @;
> > > > > if t = 27 then put @261 var @;
> > > > > if t = 28 then put @271 var @;
> > > > > if t = 29 then put @281 var @;
> > > > > if t = 30 then put @291 var @;
> > > > > if t = 31 then put @301 var @;
> > > > > if t = 32 then put @311 var @;
> > > > > if t = 33 then put @321 var @;
> > > > > if t = 34 then put @331 var @;
> > > > > if t = 35 then put @341 var @;
> > > > > if t = 36 then put @351 var @;
> > > > > if t = 37 then put @361 var @;
> > > > > if t = 38 then put @371 var @;
> > > > > if t = 39 then put @381 var @;
> > > > > if t = 40 then put @391 var @;
> > > > > if t = 41 then put @401 var @;
> > > > > if t = 42 then put @411 var @;
> > > > > if t = 43 then put @421 var @;
> > > > > if t = 44 then put @431 var @;
> > > > > if t = 45 then put @441 var @;
> > > > > if t = 46 then put @451 var @;
> > > > > if t = 47 then put @461 var @;
> > > > > if t = 48 then put @471 var @;
> > > > > if t = 49 then put @481 var @;
> > > > > if t = 50 then put @491 var @;
> > > > > if t = 51 then put @501 var @;
> > > > > if t = 52 then put @511 var @;
> > > > > if t = 53 then put @521 var @;
> > > > > if t = 54 then put @531 var @;
> > > > > if t = 55 then put @541 var @;
> > > > > if t = 56 then put @551 var @;
> > > > > if t = 57 then put @561 var @;
> > > > > if t = 58 then put @571 var @;
> > > > > if t = 59 then put @581 var @;
> > > > > if t = 60 then put @591 var @;
> > > > > if t = 61 then put @601 var @;
> > > > > if t = 62 then put @611 var @;
> > > > > if t = 63 then put @621 var @;
> > > > > if t = 64 then put @631 var @;
> > > > > if t = 65 then put @641 var @;
> > > > > if t = 66 then put @651 var @;
> > > > > end;
> > > > > put;
> > > > > end;
> > > > > run
> > > > >
> > > > >
> > > > >
> > > > > WARNING: File out already open; new options ignored.
> > > > >
> > > > >
>
>
|