04-16-2012 05:13 AM
%LET IN1=(sum(sumliab,-sumliabp)>0 AND sum(sumliab,-sumliabp)<100000);
where 'New Cust Ind'n=&ntb AND 'Ver Date'n = &curdate AND SUM (&product,-&pro1) >=0.01 and &&custclass;
in this macro ,the last input variable is for custclass,
and it has been declared in %let
but this quoting &&custclass is not my intention.
my intention is this &&custclass=(sum(sumliab,-sumliabp)>0 AND sum(sumliab,-sumliabp)<100000);(ln let statement equals value for IN1)
04-16-2012 07:55 AM
From what you posted I believe what you need to do is:
- define the macro before you call it!
%inoutflow must come AFTER %macro inoutflow;.... %mend;
Don't use quotes. This way the macro variable resolves and the macro value is passed as parameter to the macro call.
- ...,-&pro1) >=0.01 and &custclass
Only one '&' is needed as the macro variable already contains the resolved value from &IN
Else: You would have to pass &IN1 to the macro call in a way that it doesn't get resolved -> %nrstr(&in1) .... but why would you do that?
04-16-2012 09:22 PM
It solved my problem.Very thanks. And sorry to put macro-using before defining.
what's worse, I can find "correct answer" click near your discussion.