You could use one of the methods you just learned for parsing the macro variable.
A data step for example:
data _null_;
do i=1 to to countw("&numeric_Vars",'+');
call execute('%nrstr(%inf_value)(ttt,information_value,'
||scan("&numeric_vars",i,'+')
||',Ind_Failure)'
);
end;
run;
But perhaps the code that macro is generating using that third positional parameter is something that can accept multiple variables? For example if the macro definition as something like:
%macro inf_value
(parm1 /* ttt */
,parm2 /* information_value */
,parm3 /* numeric variable */
,parm4 /* Ind_Failure */
);
proc reg dataset=analysis_set_&parm1 ;
where group ="&parm2";
model &parm4 = &parm3 ;
run;
%mend inf_value;
Then you could call with something like:
%inf_value(ttt,information_value
,a_Shir_SmlHov_Pigur
a_Shir_AKM_HZRHIUV
a_Shir_Vetek_age_Balut
a_CDO_ExCC_mx_pos_prob
,Ind_Failure);
And it might make sense.
In that case it would be better to use space instead of + as the delimiter between the variable names.
If not you could possible modify the macro to add a %DO loop to loop over the list of values.
%macro inf_value(parm1,parm2,parm3_list,parm4);
%local i parm3 ;
%do i=1 %to %sysfunc(countw(&parm3_list,+));
%let parm3=%scan(&parm3_list,&i,+);
/* body of the original macro */
%end;
%mend inf_value;
In which case you could call it with your list substituted into the third positional parameter.
%inf_value(ttt,information_value,&numeric_vars,Ind_Failure);
And if you cannot modify the macro then make a new macro so you can have it run the %DO loop and generate the calls to the original macro.
... View more