Hi All,
I have 30 different datasets in SAS and I would like to merge each one of them with a standard one I have. I am trying to write a macro to do that automatically for me. Unfortunately my macro (see below) does not work and I am not sure why this is the case. I get an error message:
WARNING: Apparent symbolic reference DISEASE_CLINIC not resolved.
ERROR 22-322: Expecting a name.
ERROR 200-322: The symbol is not recognized and will be ignored.
%macro merge(disease=);
proc sql;
create table test.&disease_clinic as
select *
from test.clinical_diagnosis left join test.&disease
on clinical_diagnosis.medcode=&disease.medcode;
quit;
%mend merge;
%merge (disease=tia);
Any ideas would be greatly appreciated.
Thanks,
A