Date: Mon, 12 Mar 2012 18:21:43 -0400
Reply-To: Tom Abernathy <tom.abernathy@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Tom Abernathy <tom.abernathy@GMAIL.COM>
Subject: Re: Is a variable name present in a list of variable names stored
in a macro variable? XXXX
Use INDEXW function.
%IF %sysfunc(indexw(%UPCASE(&E),%UPCASE(&VAR1))) %THEN %LET PRESENT = YES;
Better still the result to present and then you can use the numeric value in
future logic.
%let present=%sysfunc(indexw(%upcase(&e),%upcase(&var1)));
%if &present %then %do;
...
%end;
On Mon, 12 Mar 2012 16:03:03 -0400, Dan Abner <dan.abner99@GMAIL.COM> wrote:
>Hi everyone,
>%IF %INDEX(%UPCASE(&E),%STR( %UPCASE(&VAR1) )) %THEN %LET PRESENT = YES;
|