Not too sure about the libname, but for sql you could do:
proc sql;
create table CHGS as
select ID length=11 label=' ', QUESTID length=7 label=' '
%LET index = 1; %LET newVar = %SCAN(&newVars., &index.); %DO %WHILE ("&newVar." ~= ""); ,&newVar. label=' ' %LET index = %EVAL(&index. + 1); %LET newVar = %SCAN(&newVars., &index.); %END;
from edited."&sheet."n order by &sort;
quit;
... View more