You'll have the same issues in your column references too. E.g.:
clinical_diagnosis.medcode=&disease.medcode;
If the macro variable &disease computes to "ALPHA" then this would be equivalent to:
clinical_diagnosis.medcode=ALPHAmedcode;
If you're using the macro variable to reference a table name, then simply add a second dot, so
clinical_diagnosis.medcode=&disease..medcode;
Would become
clinical_diagnosis.medcode=ALPHA.medcode;
... View more