Hi
Since the SAS Macro Language is text based you do not need to use quotes. Since some of your text contains characters which have a meaning in the macro language (comma separating arguments in functions) you need to use quoting functions.
To understand quoting functions, I recommend to read the following blog
http://blogs.sas.com/content/sgf/2014/08/15/macro-quoting-made-easy/
Below is the changed code:
%let Filename_1 = FILE1, FILE2;
%let SAS_DATASET = DATA1, DATA2;
%macro file_process;
%let word_cnt = %sysfunc(countW(%bquote(&Filename_1), %str(,)));
%put NOTE: &=word_cnt;
%do i=1 %to &word_cnt;
%let file_name = %scan(%bquote(&Filename_1), &i, %str(,));
%let dataset = %scan(%bquote(&SAS_DATASET), &i, %str(,));
%put NOTE: &=i &=file_name &=dataset;
%end;
%mend file_process;
%file_process
Bruno
... View more