Date: Fri, 24 Oct 1997 01:14:34 GMT
Reply-To: Jan Padilla <jpadilla@HOOKED.NET>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Jan Padilla <jpadilla@HOOKED.NET>
Organization: Netcom
Subject: Re: Help: Flatfile update, without reading the data into SAS
On Thu, 23 Oct 1997 17:40:34 -0700, Scott Carl <SCARL@THECREEK.COM>
wrote:
>
>I realize this is a simple join using either SQL or datastep processing,
>but since the objective is to replace the flatfile with an updated
>flatfile, I don't think reading the data into SAS datasets, joining the
>two datasets and writing the data back to ASCII will be efficient. Any
>thoughts will be appreciated.
Hi, Scott,
I you know any other programming languanges, this would probably be a
good time to use them...COBOL or C, for example, can handle a table
lookup much more efficiently.
If that's not an option, you could set up the small dataset as a VSAM
file if you're on a mainframe, or I've been known to use a MACRO to
build one big if statement, like:
;
DATA _NULL_;
INFILE INFILE:
INPUT VAR1;
IF VAR1 = OldVal1
THEN PUT OldVal1;
ELSE IF
VAR1 = OldVal2
THEN PUT OldVal2;
...
ELSE IF Var1 = OldValN
THEN PUT OldValN;
ELSE PUT _INFILE_;
|