Just to add Tom, where you use the term "return" and "function", its not exactly that. What happens is the code is pre-processed in the macro pre-processor, which is basically a find and replace system. At this stage every macro part is resolved and the full Base SAS code program with no macro is then fed into the compiler. The reason I point this out is that after that pre-processor step the "return" value is placed in the code, it is not dynamic at run time. This can lead to some confusion when combining techniques or trying to influence the values when they have already been replaced.
... View more