You can call most functions available in Base SAS software from SAS/IML programs. If you call a Base SAS function with a matrix argument, the function will usually act elementwise on each element of the matrix.
Some DATA step functions are not applicable or not useful in the SAS/IML enviroment. For example, Base SAS functions that take a list of scalar arguments are often not very useful to the SAS/IML programmer. (The SAS/IML language does not support the OF keyword.) However, it is usually possible to use SAS/IML built-in functions to obtain the same results. For example, the SUMABS, EUCLID, and LPNORM functions in Base SAS are used to compute the vector norm of a list of arguments. Instead of using those functions, you should use the SAS/IML NORM function.
The following Base SAS functions are either not available from SAS/IML software, or behave differently from the Base SAS function of the same name.
Function |
Comment |
CHAR |
conflicts with the SAS/IML CHAR function |
CALL CATS |
return variable must be preinitialized |
DIF |
not supported; use the SAS/IML DIF function instead. |
DIM |
not supported, but see the DIMENSION function for similar functionality. |
HBOUND |
not supported |
LAG |
not supported; use the SAS/IML LAG function instead. |
LBOUND |
not supported |
base function performs “fuzzing”; the SAS/IML function does not |
|
PUT |
Use the PRINT statement instead |
CALL PRXNEXT |
return variables must be preinitialized |
CALL PRXPOSN |
return variables must be preinitialized |
CALL PRXSUBSTR |
return variables must be preinitialized |
CALL SCAN |
return variables must be preinitialized |
VVALUE |
not applicable: interrogates DATA step variables |
VVALUEX |
not applicable: interrogates DATA step variables |
VNEXT |
not applicable: interrogates DATA step variables |
There are also some Base SAS features that are not supported by the SAS/IML language. For example, the DATA step permits N-literals (strings that end with ’N’) to be interpreted as the name of a variable, but the SAS/IML language does not.
The following Base SAS functions can be called from SAS/IML. The functions are documented in the SAS Language Reference: Dictionary. In some cases, SAS/IML does not accept all variations in the syntax. For example, SAS/IML does not accept the OF keyword as a way to generate an argument list in a function.
The functions displayed in italics are documented elsewhere in this user’s guide. These functions operate on matrices in addition to scalar values, as do many of the mathematical and statistical functions.