11-22-2013 05:59 AM
running the following code:
put q= w=;
%put %index("aaaaBIANNUAL", %trim("BIANNUAL")) ;
I get this result:
it semmes that the function index work in two different way if used in a data step or in a macro (in the datastep in a correct wat, in the macro does not work)
Does someone know the reason?
11-22-2013 02:05 PM
Macro functions generally are text manipulators and do NOT require the quotes to distinguish between variable names and string literals as in a datastep. If you put a quote in any of the argument strings it is treated as being a part of the string. So "BIANNUAL" is not part of aaaaBIANNUAL in any way.