BookmarkSubscribeRSS Feed
rbettinger
Lapis Lazuli | Level 10

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
Lapis Lazuli | Level 10
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
Lapis Lazuli | Level 10
Thanks, Tom. I appreciate your help with my question.

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

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
  • 1988 views
  • 0 likes
  • 3 in conversation