BookmarkSubscribeRSS Feed
PruthviBhupathiraju
Calcite | Level 5

I am getting the following error when trying to run the decision tree node in enterprise Miner:

ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was: n+1

ERROR: The macro EM_TREE_RUNTREEPROCEDURE will stop executing.

Can you please let me know the reason?

4 REPLIES 4
ballardw
Super User

%eval wants either an integer literal or a macro variable that resolves to an integer.

%let n= 5;

%let x = %eval(&n +1);

%put &x;

You can get this message in %if or %do loops as well as they have implicit calls to %eval that you don't see. The place you have n+1 needs &n+1.

PruthviBhupathiraju
Calcite | Level 5

How do I correct this error in enterprise Miner.

ballardw
Super User

Without seeing the code generated other than the suggestion about &n+1 instead of n+1, no idea.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1058 views
  • 0 likes
  • 3 in conversation