Hi, I have a very basic question about macros. I am trying to write a simple macro to merge two datasets. My code looks like this %macro form_merge (form); proc sql; create table _%form as select a.%form,a.var1 from work.data1 as A left join work.data2 as B run; %mend form_merge; %form_merge (X); However, it is not working. For the 'create table' line, I get the warning "Apparent invocation of macro FORM not resolved", and the error "22-322: Syntax error, expecting one of the following (, '-'..." When I run this as just regular code (i.e., substituting X for %form), it works fine. Can someone please tell me what I'm doing wrong?
... View more