The following functions
permit vector and matrix arguments. You can use them only within the
IML procedure:
For more information,
see the documentation for
SAS/IML Studio: User's Guide.
The MODULE functions
execute a routine
module that
resides in an external (outside SAS) shared library with the specified
arguments
arg-1 through
arg-n.
The MODULE call routine
does not return a value, while the MODULEN and MODULEC functions return
a number
num or a character
char,
respectively. Which routine you use depends on the expected return
value of the shared library function that you want to execute.
MODULEI, MODULEIC, and
MODULEIN are special versions of the MODULE functions that permit
vector and matrix arguments. Their return values are still scalar.
You can invoke these functions only from PROC IML.
Other than this name
difference, the syntax for all six routines is the same.
The MODULE function
builds a parameter list by using the information in
arg-1 to
arg-n and by using a routine description and argument attribute
table that you define in a separate file. Before you invoke the MODULE
routine, you must define the fileref of SASCBTBL to point to this
external file. You can name the file whatever you want when you create
it.
This way, you can use
SAS variables and formats as arguments to the MODULE function and
ensure that these arguments are properly converted before being passed
to the shared library routine.
CAUTION:
Using the
MODULE function without defining an attribute table can cause SAS
to crash, produce unexpected results, or result in severe errors.
You need to use an
attribute table for all external functions that you want to invoke.