Your example will not work because what the macro processor see's the following which is too many parameters since you have two comma's in there now.
%let a=abcd,efgh@hijk ;
%let b=%index(abcd,efgh@hijk,c) ;
@thanikondharish wrote:
%let a=abcd,efgh@hijk ;
%let b=%index(&a,c) ;
I want to know postion of c letter but the above not working
Hi
You can put inside the %BQUOTE function
%let a=%BQUOTE(abcd,efgh@hijk) ;
%let b=%index(&a,c) ;
%PUT &b. &a.;
OUTPUT:
76 %let a=%BQUOTE(abcd,efgh@hijk) ;
77
78 %let b=%index(&a,c) ;
79
80 %PUT &b. &a.;
3 abcd,efgh@hijk
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.