You might want to use the %QLIST macro, which is much easier than writing your own macro. I have used %QLIST for years and it works as desired.
Your particular problem can be solved by using %UNQUOTE
%let quoted_names = %unquote(%substr("ed_names, 1, %length("ed_names) - 2));
Why does %UNQUOTE work here? I have trouble explaining it other than to say when it looks like you have coded everything properly and you still get errors, and it usually involves a case where you created a quoted string in the macro, try %UNQUOTE. Or perhaps Mr. @Astounding can explain, you can search for his explanation of this in previous threads, or buy his book (the name of which I have forgotten) which also explains.
... View more