In reply to LL.

You can use PUT instead of %PUT to output the value of a DATA step variable to the log. You can use CALL SYMPUT to create a macro variable from the value of a DATA step variable. If that doesn't answer your question, post your question and data to the SAS Support Communities.