Date: Tue, 29 Nov 2011 12:52:16 -0800
Reply-To: Paul Miller <pjmiller_57@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Paul Miller <pjmiller_57@YAHOO.COM>
Subject: Re: Merge/coding problem using index, find,
or some other SAS function (with have and need data)
In-Reply-To: <CAM+YpE8USYqzcqZWSBZE7RFfDAMK-bKtbu1x-K4cO3gskLyRqg@mail.gmail.com>
Content-Type: text/plain; charset=iso-8859-1
Hi Joe,
Know I can create a format using code like that pasted below.
What would the SCAN part look like?
Thanks,
Paul
libname mylib oledb provider="microsoft.jet.oledb.4.0" preserve_tab_names=yes preserve_col_names=yes
properties=('data source'="n:\drug formats.xls") provider_string="excel 8.0";
data fmt;
retain fmtname '$drugs';
set mylib.'sheet1$'n end=last;
run;
libname mylib clear;
proc format cntlin=fmt;
select $drugs;
run;
proc delete data=fmt;
run;
--- On Tue, 11/29/11, Joe Matise <snoopy369@gmail.com> wrote:
> From: Joe Matise <snoopy369@gmail.com>
> Subject: Re: Merge/coding problem using index, find, or some other SAS function (with have and need data)
> To: "Paul Miller" <pjmiller_57@yahoo.com>
> Cc: SAS-L@listserv.uga.edu
> Received: Tuesday, November 29, 2011, 2:26 PM
> Hmmm. Are the individual pieces
> always whole words? Like in your
> example you had two words, one of which matched. If
> that's the case,
> then you could build a format list, and use SCAN to search
> over the
> word, checking each SCANned piece to see if it
> mathces. Also, if you
> do indeed have first part always being the match, you can
> take
> advantage of that, as pointed out earlier.
>
> -Joe
>
|