Thank you everyone so much for the quick reply. I apologize for the lack of information on the posted issue, I will try to include more description on the code and intent next time. I will be reading up more on macro language, the position of my %LET and call execute. I find @ErikLund_Jensen's solution closely address what I had in mind for the code. I have learnt a lot by reading through his in-depth explanation of the solution. A sincere thanks for spending so much effort for the reply, it was of great help. Learning SAS coding isn't easy but I am glad that the SAS community is willing and eager to help, thanks for all the replies.😊
... View more