%macro concatv(pname); %*--If the SAS/IntrNet parm (name passed as single positional parm) has multiple values then concatenate them and store as the value of that unmodified parm. Modifies the value of the variable with name &pname iff we see multiple values. Because sas/intrnet likes to break up long values into pieces. For example: if pname=v2, v20=2 v21=kansas v22=city then macro assigns v2=kansascity . --*; %local _n _i; %global &pname.0 &pname; %let _n=&&&pname.0; %if &_n eq %str() %then %goto endmac; %if &_n=1 %then %goto endmac; %let &pname=&&&pname.1; %do _i=2 %to &_n; %let &pname=&&&pname.&&&pname.&_i; %end; %endmac: %mend concatv;