MODULEIN (control, modname, <matrix1, …, matrix13> );
The MODULEIN subroutine calls an external routine that returns a numerical value.
The arguments to the MODULEIN function are as follows:
is a character matrix that contains a control string.
is a character matrix that contains the name of the external routine to be called.
specifies matrix parameters to be passed to the external routine.
The MODULEIN routine executes a routine modname that resides in an external shared library with the specified arguments and that returns a numeric value.
The description of this function is identical to the description of the MODULEI call , except that the MODULEIN function returns a scalar numeric value from the external routine. See the MODULEI call for a full description of the function and its arguments.
This example invokes the CHANGI routine from the TRYMOD.DLL module on a Windows platform. Use the following attribute table.
routine changi module=trymod returns=long; arg 1 input num format=ib4. byvalue; arg 2 update num format=ib4.;
The following statements call the CHANGI function:
proc iml; ones = J(4,5,1); i = do(10, 40, 10); j = 4:8; x1 = i` # ones + j; y1=x1; x2=x1; y2=y1; rc=modulein("*i","changi",6,x2);