Hello, I have a table with a single column (sas_datasets) that has the names of files as its values, i.e. sas_datasets ------------------------------------- /work/users/file1.sas7bdat /work/users/file2.sas7bdat ... I use the following /* Note that I inserted the asterisk (*) after the percent sign (%) below to prevent it from evaluating to 0, instead I need it as text */ proc sql noprint; select cats('%*sysfunc(fileexist(','"',sas_datasets,'"))') into :untils separated by ' AND ' from sas_datasets ;quit; /* Here I remove the asterisk */ %put NOTE: %qsysfunc(compress(&untils,*)); resolves to %sysfunc(fileexist("/work/users/file1.sas7bdat")) AND %sysfunc(fileexist("/work/users/file2.sas7bdat")) /* CHECK IF SAS DATASETS ARE READY */ %macro fex; /* Here I want this to resolve to 1 if both files exist and to 0 otherwise */ %do %until ( %eval(%unquote(%qsysfunc(compress(&untils,*)))) ); %put NOTE: Not There Yet!; %macro sleep; data _null_; x = sleep(1000); run; %mend sleep; %sleep; dm 'clear log'; %end; %mend fex; %fex; The %macro fex fails with the following errors: ERROR: Expected close parenthesis after macro function invocation not found. ERROR: %EVAL function has no expression to evaluate, or %IF statement has no condition. ERROR: %EVAL function has no expression to evaluate, or %IF statement has no condition. ERROR: The condition in the %DO %UNTIL loop, %eval(%unquote(%qsysfunc(compress(&untils,*)))), yielded an invalid or missing value, . The macro will stop executing. ERROR: The macro FEX will stop executing. Please help me resolve this issue! Thanks
... View more