The MODULE functions
execute a routine
module that
resides in an external (outside SAS) dynamic link 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 DLL 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.
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 DLL routine.
CALL MODULEI, MODULEIN,
and MODULEIC permit vector and matrix arguments; you can use them
within the IML procedure.