Minor embellishment to code from Sushil Nayak taking advantage of COUNTW function (new with SAS 9), and to echo resolved macro var string back to the SASLOG -- also added optional macro invocation parameters for flexibility:
%macro splitter(string=,wordpfx=WORD,dlm=%str( ));
%do cnt=1 %to %sysfunc(countw(&string,&dlm));
%global &wordpfx&cnt;
%let &wordpfx&cnt = %scan(&string,&cnt,%str(&dlm));
%* echo macro var result to log window;
%put &wordpfx&cnt=&&&wordpfx&cnt;
%end;
%mend splitter;
%splitter(string=base\macros\sql\advance,wordpfx=xxx,dlm=\);
Scott Barry
SBBWorks, Inc.