Hi Tom, Thanks for your suggestions. Since I have a couple of different tables I want to create for each building I think using a macro with more than one parameter is the best solution. However, I'm new to macros and am having trouble with the next step. I wrote this marco: %macro do_id_name(id,name). When I call the macro with %do_id_name; I get this error: WARNING: Apparent symbolic reference ID not resolved. WARNING: Apparent symbolic reference NAME not resolved. ERROR: Syntax error while parsing WHERE clause. ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant, a missing value, INPUT, PUT. ERROR 76-322: Syntax error, statement will be ignored. I have: %macro do_id_name(id,name); ....proc report title1 "Annual Report for &id and &name"; ... where building_id = &id and building_name = "&name" ; .... proc report title1 "Annual Report for &id and &name"; ... where building_id = &id and building_name = &name ; .... %mend do_id_name; %do_id_name;
... View more