06-01-2017 03:41 PM
I get the following errors when executing themacro bbb. the errors come from the line colored in red. Any suggestions would be greatly appreciated.
thank you in advance.
ERROR: Required operator not found in expression: wrd&i. in (&word_list.)
ERROR: The macro BBB will stop executing.
%if wrd&i. in (&word_list.) %then %do;
var&j. = wrd&i.;
%let j = %eval(&j. + 1);
%let j = 1;
%do i = 1 %to 60 ;
06-01-2017 04:17 PM
And with RSUBMIT involved you may be missing a whole bunch of stuff that will impact the operation you are attempting.
What is your current definition of the macro varialble &word_list?
Are the "words" separated by the proper delimiter set by the MINDELIMITER system option?
You also do realiazize that the comparison is going to be case sensitive.
wrd1 will not match WRD1
You could also describe what you are attempting to do with this as it appears to be a somewhat convoluted way to do a look up of some flavor. Can you provide a small (not the apparent all 60 values/variables) example of what you are attempting to get with start data and what the final result should look like?
06-04-2017 02:41 PM
@KevinC_: I think the problem is with the IN clause.
First, you must make sure that the remote system recognizes IN - you should either use
rsubmit; options minoperator; %macro bbb(i);
rsubmit; %macro bbb(i)/minoperator;
The first method makes In valid in all macros in the remote session, the second method makes if valid for that specific macro, only.
Second, make sure that your WORD_LIST macro variable is not empty, I think that could create a message like the one you got:
rsubmit; options minoperator; %macro bbb(i); %if %length(&word_list) %then %if wrd&i in(&word_list) %then %do;
If that does not work, check up on the documentation for the MINOPERATOR option.