BookmarkSubscribeRSS Feed
rbettinger
Pyrite | Level 9

I am teaching myself how to use lists in SAS/IML as available in SAS onDemand for Academics. The sample program on the SAS/IML 15.1 User Guide p. 169 contains the code

%include sampsrc(LstBST.sas); /* define modules */
proc iml;
load module = _all_; /* load modules */
x = {5 3 1 9 1 6 4}`;
bst = BSTCreate(x);
title "Diagram of Binary Search Tree";
call BSTPlot(bst);
quit;

which, when I run the code, produces the following error message:

 
WARNING: Physical file does not exist, /pbr/sfw/sas/940/SASFoundation/9.4/samples/accesssample/LstBST.sas.
ERROR: Cannot %INCLUDE member LstBST.sas in the aggregate SAMPSRC.
164
165 %include sampsrc( LstBST.sas ) ; /* define modules */
166
167 proc iml ;
NOTE: IML Ready
168 load module=_all_ ;
NOTE: Opening storage library WORK.IMLSTOR
168 ! /* load modules */
169
170 bst = BSTCreate( x ) ;
ERROR: Invocation of unresolved module BSTCREATE.
 
statement : ASSIGN at line 170 column 4
171 title "Diagram of Binary Search Tree" ;
172 call BSTPlot( bst ) ;
ERROR: Invocation of unresolved module BSTPLOT.
 
statement : CALL at line 172 column 4
173 quit ;
Has anyone else encountered this error? Is the SAMPSRC library not included in the SAS/IML product for SAS onDemand for Academics?
Thanks in advance,
Ross Bettinger

 

4 REPLIES 4
Rick_SAS
SAS Super FREQ

Unfortunately, I don't know the answer to your question about SODA. However, the examples are part of the documentation and are publically available in other installations of SAS. I've put the list-related example programs in a github repo so that you can browse or download them:

SAS/IML sampsrc files

 

Hope that helps.

rbettinger
Pyrite | Level 9
Thanks, Rick. I will use your code and make my own module library.
Tom
Super User Tom
Super User

I the github repository created by @Rick_SAS  there is no file named "LstBST.sas". 

But there is a file named "lstbst.sas".

Filenames on unix filesystems are case sensitive.

rbettinger
Pyrite | Level 9
Thanks, Tom. I appreciate your help with my question.

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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