BookmarkSubscribeRSS Feed
BobtheModelBuilder
Calcite | Level 5

Hello,

Is anyone still using the treedisc macro SAS released so many years ago? I used to have a nice little program that used it and the xmacro.sas program to run a basic CHAID analysis. It wasn't slick but did the job when I needed it. However, sometime after I got upgraded to version 9.3 it doesn't seem to work anymore. The program errors out in the IML section and I don't know IML enough to debug. Does anyone still running Treedisc.sas have any problems with running it in V9.3?

Thanks!

4 REPLIES 4
art297
Opal | Level 21

I used it as recently as last June and, as best I recall, we were running on SAS 9.3 at the time.

Hutch_sas
SAS Employee

Maybe if you posted the code and the error log we might be able to figure out what is causing the error?

SASDescUser
Calcite | Level 5

Hi,

I am trying to run the %TREEDISC macro of SAS on SAS Enterprise Guide 4.3.

I have obtained the two codes from the following links.

  1. Treedisc.sas: http://www.public.iastate.edu/~kkoehler/stat557/sas/treedisc.sas/
  2. Xmacro.sas: http://schick.tripod.com/xmacro.sas/

I have changed the following statement to refer to the xmacro.sas-the file containing XMACRO on my system.

*%inc '/sas/m611/stat/sampsrc/xmacro.sas';

I am trying to execute the example given in the beginning of treedisc.sas code to run the %treedisc macro.

I get the following errors after which the treedisc macro terminates.

17         *** Compute a tree for predicting SPECIES from the petal and

18             sepal lengths and widths, which are treated as ordinal

19             predictors;

20         %treedisc( data=iris, depvar=species, ordinal=petal: sepal:,

21                    outtree=trd, options=noformat, trace=2);

ERROR: Procedure IML not found.

ERROR: Unrecognized form of the RUN statement.  Use either RUN; or RUN CANCEL;.

ERROR: Unrecognized form of the RUN statement.  Use either RUN; or RUN CANCEL;.

ERROR: Unrecognized form of the RUN statement.  Use either RUN; or RUN CANCEL;.

ERROR: Unrecognized form of the RUN statement.  Use either RUN; or RUN CANCEL;.

ERROR: Unrecognized form of the RUN statement.  Use either RUN; or RUN CANCEL;.

ERROR: File WORK._DESC_.DATA does not exist.

WARNING: The data set WORK._DESC_ may be incomplete.  When this step was stopped there were 0 observations

         and 2 variables.

ERROR: Unknown error constructing OUTTREE= data set while running the TREEDISC macro.

NOTE: The TREEDISC macro terminated due to error(s).

Can anyone please guide me to fix these issues?

BobtheModelBuilder
Calcite | Level 5

I will have to run it again with the macro tracing on and save the log to see where the error occurs.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 4 replies
  • 2577 views
  • 0 likes
  • 4 in conversation