%tq84_createId
creates a unique identifier. This macro is used in createMacro. %global tq84_idCounter; %let tq84_idCounter = 0; %macro tq84_createId(prefix); %local idRet; %let idRet = &prefix&tq84_idCounter._; %let tq84_idCounter = %eval(&tq84_idCounter + 1); &idRet %mend tq84_createId;
%put %tq84_createId(foo); /* foo0_ */ %put %tq84_createId(bar); /* bar1_ */ %put %tq84_createId(baz); /* baz2_ */ %put %tq84_createId(foo); /* foo3_ */