[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sas-l
Subject:    Re: read a large data set in ascii format into sas
From:       Peter Crawford <peter.crawford () DB ! COM>
Date:       1999-09-30 20:01:33
[Download RAW message or body]

The main thing about RECFM=F (F stands for Fixed), is that the input engines
don't look for an "end-of-line" signal. They just assume that the next record
starts straight after the number of bytes or characters, given by the value of
LRECL. (which stands for logical record length).

Regards


Datum:         30.09.99 20:34
An:            SAS-L@listserv.uga.edu




Antwort an:    yzhao@haas.berkeley.edu

Betreff:       Re: read a large data set in ascii format into sas
Nachrichtentext:



Hi Peter,

I read all the data into Sas after I added the options lrecl=104 recfm=F
in the infile statement. Could you please kindly explain the meaning of
"F" in the recfm option? Thank you so much for the help.

Ying

In article <412567FB.002D758C.00@dbogw2-e1.esb.eur.deuba.com>,
  peter.crawford@DB.COM wrote:
> depending on the origin of that data on tape, you may need
> these options on your infile statement
>      lrecl=104 recfm=F
> It seems that the SAS input routines don't know that there is
> more than one record, which can happen when your raw data
> has a fixed shape like yours and omits an "end-of-line" character.
>
> Please post a snip of the log if these infile options don't fix it.
>
> Datum:         29.09.99 00:00
> An:            SAS-L@listserv.uga.edu
>
> Antwort an:    zhaoying@my-deja.com
>
> Betreff:       Re: read a large data set in ascii format into sas
> Nachrichtentext:
>
> Thank you all for the help. I took the "@@" off the end. I did not get
> error message this time, but only one observation was read and written
> in the output file.Is it because that the file is ascii format?
>
> Ying
>
> In article <TLSP4282D4470@telespan.demon.co.uk>,
>   "Chris Jones" <chris@telespan.demon.co.uk> wrote:
> > Ying,
> >
> > What you are doing is re-reading the first line for each iteration.
In
> > effect an endless loop. Take the "@@" combination off the end, and
> your
> > program should read the tape file without filling up your disk.
> >
> > --
> > Chris Jones
> >
> > Respond to: chris@telespan.demon.co.uk
> > Web: http://www.telespan.demon.co.uk
> > <zhaoying@my-deja.com> wrote in message
> news:7sgere$f90$1@nnrp1.deja.com...
> > > Hi Dan,
> > >
> > > The statement I used is:
> > >
> > > data data1;
> > > options bufsize=400M linesize=max;
> > > infile '~/tape.2.ascii';
> > > input  cid 1-2
> > >        market  3-4
> > >        week 5-10
> > >        day 11
> > >        trip 12
> > >        hid 13-20
> > >        upc 21-33
> > >        sid 34-37
> > >        styp 38
> > >        totunit 39-43
> > >        price 44-50
> > >        weight 51-57
> > >        scoup 58-60
> > >        tupsc 61-63
> > >        tvscoup 64-68
> > >        tupms 69-71
> > >        tvmcoup 72-76
> > >        ef 77-87
> > >        line 88-91
> > >        edisplay $ 92
> > >        fdisplay $ 93
> > >        idisplay $ 94
> > >        odisplay $ 95
> > >        adv $ 96
> > >        adtype $ 97
> > >        adcoup $ 98
> > >        popc $ 99
> > >        sprice $ 100
> > >        coupfac $ 101
> > >        filler $ 102-104@@;
> > > run;
> > > proc print;
> > > endsas;
> > >
> > > And I got an error message of not having enough space.
> > >
> > > Ying
> > >
> > >
> > > Sent via Deja.com http://www.deja.com/
> > > Before you buy.
> >
> >
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>


Sent via Deja.com http://www.deja.com/
Before you buy.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic