The SAS/IML language resolves functions in the following order:
User-defined SAS/IML modules that exist in the current environment
Function in the STORAGE library, if it is open
Functions in the IMLMLIB library
Functions built into SAS/IML software
SAS DATA step functions
Prior to SAS/IML 13.1, the order of resolution was different. The order was changed in order to make it easier for programmers to call user-defined functions.
When you call a module by using the CALL statement, the SAS/IML language resolves subroutines in the following order:
Subroutines built into SAS/IML software
User-defined SAS/IML modules that exist in the current environment
Subroutines in the STORAGE library, if it is open
Subroutines in the IMLMLIB library
SAS DATA step subroutines
If you want to be sure that user-defined subroutines take precedence over built-in subroutines, use the RUN statement. When you call a module by using the RUN statement, the SAS/IML language resolves subroutines in the following order:
User-defined SAS/IML modules that exist in the current environment
Subroutines in the STORAGE library, if it is open
Subroutines in the IMLMLIB library
Subroutines that are built into SAS/IML software
SAS DATA step subroutines