As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

Tips:Macro Parameter Values using parmbuff & syspbuff

From sasCommunity
Jump to: navigation, search

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.

%macro print/parmbuff;
    %put macro contains : &syspbuff;
    %let cnt = %sysfunc(countw(&syspbuff));
    %do i = 1 %to &cnt;
        %let print = %scan(&syspbuff, &i);
%mend print;                                                                                                                            
%print(blue, red, yellow);

macro contains : (blue,red,yellow)
Submitted By Chithra Mohan