10-22-2012 06:56 PM
Recently I learnt that whenever we are refwerring to SAS functions in MAcros we have to use %sysfunc.
In this piece of code ISNT SCAN a SAS function? Don t we need to use %sysfunc before the SCAN.
%let varnames= Apple ball cat orange;
ods pdf file='myfilename';
%do i=1 %to %sysfunc(countw(&varnames));
%let thisvar=%scan(&varnames,&i, &str());
10-22-2012 06:59 PM
SCAN is a SAS function
%SCAN is a SAS MACRO
And not all functions work with sysfunc, read the documentation
Need further help from the community? Please ask a new question.