I would like to know how to use substr function with macro variables. I have the macro variables as follows and I would like to look for first five characters and select the last three characters based on the condition as mentioned below. Not sure it is right and I do not have SAS to execute to it (downtime now). Correct me if I'm wrong.
%let ent_curr=10000_EUR; /*i have many macro variables like this*/
/*and I have to write the condition as like below*/
/*given below is sample condition and there are some conditions as similar which I have to write*/
Case
When entity =substr(&ent_curr.,1,5) then substr(&ent_curr.,7,9)
Else
Currency_cd
End;
... View more