Tips:Macro Parameter Values using parmbuff & syspbuff
Using the PARMBUFF option and SYSPBUFF, you can define a macro that accepts a varying number of parameters at each invocation.
SYSPBUFF resolves to the text supplied as parameter values in the invocation of a macro that is defined with the PARMBUFF option.
%put macro contains : &syspbuff;
%let cnt = %sysfunc(countw(&syspbuff));
%do i = 1 %to &cnt;
%let print = %scan(&syspbuff, &i);
%print(blue, red, yellow);
macro contains : (blue,red,yellow)