Yeah, You are right, Tom. I can make it a permanent file so that I can look at it easily. should have done that earlier. Thanks for reminding me. I will also read the blog you shared. Thank you. Basically, I am debugging a macro written by somebody else. The problem is: There is a macro variable in the macro. The macro variable is created from the temp fileref. This particular macro variable will only resolve if you run the macro two or more batches together. For example: if you do % themac (data1); it will not resolve for data1. if you do % themac (data1); % themac (data2); % themac (data3); it will resolve correctly for data2 and data3, but not for data1. The only way to get it resolved for data1 is to change the order of the runs, like, % themac (data2); % themac (data1); % themac (data3); In this case, again it will not resolve for data2. I will keep working on this issue recently. I don't have a sample macro to show this problem yet. I may make one later and ask for extra help here.
... View more