Language Reference

MODULEI Call

calls an external routine without any return code

CALL MODULEI( control, modname, <matrix1,...,matrix13>);

The inputs to the MODULEI subroutine are as follows:


control
is a character matrix containing a control string.

modname
is a character matrix containing the name of the external routine to be called.

matrix
matrices with parameters to be passed to the external routine.

The CALL MODULEI routine executes a routine modname that resides in an external shared library with the specified arguments.

The MODULEI call routine is the IML version of the MODULE call routine that is available in the SAS DATA step. It is also closely related to the MODULEIN function, which returns a scalar numeric value, and the MODULEIC function, which returns a character value. CALL MODULEI builds a parameter list by using the information in the arguments and a routine description and argument attribute table that you define in a separate file. The attribute table is a sequential text file that contains descriptions of the routines that you can invoke with the CALL MODULEI routine and MODULEIN and MODULEIC functions. The purpose of the table is to define how CALL MODULEI should interpret its supplied arguments when it builds a parameter list to pass to the external routine. The attribute table should contain a description for each external routine that you intend to call, and descriptions of each argument associated with that routine. This enables you to call external routines that have been compiled in different programming languages that use different calling and matrix representation conventions.

Before you invoke CALL MODULEI, you must define the fileref of SASCBTBL to point to the external file that contains the attribute table. You can name the file whatever you want when you create it. You can then use SAS/IML matrices as arguments to CALL MODULEI and ensure that these arguments are properly converted before being passed to the external routine. The exact syntax for the attribute table is system dependent, and can be found in the SAS companion guide for the system you are using. Attempting to use CALL MODULEI for a module without a correct attribute table entry can cause the SAS System to fail or even force you to reset your computer.

Previous Page | Next Page | Top of Page