The error means that there is an unclosed quote. When you use proc sql to enclose codes in quotes and separate them by commas, you have to hard code the first quote for the first code and the last quote for the last code, like this: proc sql; select codes into:code_name separated by '", "' from table;quit; %put ("&code_names"); I always mess this up too.
... View more