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
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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: