Date: Tue, 8 Apr 2003 05:22:17 -0700
Reply-To: Basem <batawfic@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Basem <batawfic@YAHOO.COM>
Organization: http://groups.google.com/
Subject: Problem
Content-Type: text/plain; charset=ISO-8859-1
Hi gurus
Why the %if condition is not working, whatever the content of component_id_(1-6)
I always get true condition
%macro fill_K_component(indata=out1);
data _null_;
set indata;
%do j=1 %to 6;
%if component_id_&j ne 0 %then %do;
select (component_id_&j);
when (2654, 2655)
if &component_K2 eq 0 then call symput('component_K2',component_id_&j);
when (2656, 2657)
if &component_K3 eq 0 then call symput('component_K3',component_id_&j);
when (2658, 2659)
if &component_K4 eq 0 then call symput('component_K4',component_id_&j);
when (2660, 2661)
if &component_K5 eq 0 then call symput('component_K5',component_id_&j);
when (2662, 2663)
if &component_K6 eq 0 then call symput('component_K6',component_id_&j);
when (2664, 2665)
if &component_K7 eq 0 then call symput('component_K7',component_id_&j);
otherwise;
end;
%end;
%end;
run;
%mend;
|