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
It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.
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.