Date: Thu, 14 Aug 2003 11:07:11 -0700
Reply-To: PD <sophe88@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: PD <sophe88@YAHOO.COM>
Organization: http://groups.google.com/
Subject: Re: Add one var to a large flat file
Content-Type: text/plain; charset=ISO-8859-1
My issue was that there are 2 separate flat files with a common key.
So I read in the whole 3500 byte as one big char var. I only needed to
set lrecl at Infile statement at 3500 (otherwise, it defauls and cuts
off at, in my case 126. I thought the default is 256. but does not
matter). Then sort the big sas file and match-merge and put it back to
a new DSN.
PD
stigeide@yahoo.com (Stig Eide) wrote in message news:<faa59d77.0308102301.5555d352@posting.google.com>...
> Hi PD.
> I have not tested this but I would think you could do this in one pass,
> using input and put to/from the same file, like this:
> filename x 'path-to-file';
> data _null_;
> infile x lrecl=9999;
> file x lrecl=9999;
> input @32 avar;
> newvar=function(avar);
> put _infile_ newvar;
> run;
>
> Hope this helps!
> Stig Eide
>
> sophe88@yahoo.com (PD) wrote in message news:<3b6685a4.0308101841.66d3fceb@posting.google.com>...
> > This question may have been asked by many before.
> >
> > I have a flat file that has many variables. Record length is about
> > 3500. It has a matching key.
> >
> > I have read one var off this file to creat a new var. Now I have a new
> > SAS file that carries the matching kecy and the new var.
> >
> > I need to append the new var to the original file. What is the best
> > way to do it? Thanks.
> >
> > PD
|