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>
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.
firstname.lastname@example.org (Stig Eide) wrote in message news:<email@example.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;
> put _infile_ newvar;
> Hope this helps!
> Stig Eide
> firstname.lastname@example.org (PD) wrote in message news:<email@example.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