12:32 PM you posted this, with extra Semicolon on the end (%then ¤t;) %macro check_and_add(current,new);
%if %sysfunc(findw(¤t,&new,,s)) %then ¤t;
%else ¤t &new;
%mend; After your last post you mentioned without Semicolon and now it works! Thank you very much. I have to accept that the same Macro-Variable must be entered twice: %let parameter_macrovariable = %ChkValueList_Add(p_list = ¶meter_macrovariable . ,p_value = Value1); And about your comment why use %put-Statments. Please do not forget, we are using SAS, which is sometimes a pain. It makes a big difference if you write Code in a Macro, in Data Set, outside Macro etc... I prefer to write more Code, who is working almost everywhere.
... View more