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
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: