Hi, Try this Piece of code.I didn't try on sas but hope it will help you to achieve your requirement. %let var = acct_id product_id ; %let value = $10 $40; %let num = 2; %macro chk; data test; %do i = 1 %to # x1 = scan("&var.",&i.," "); x2 = scan("&value.",&i.," "); output; %End; Run; %mend; %chk; If any concern pls let me know
... View more