![]() Chapter Contents |
![]() Previous |
![]() Next |
| CALL MODULE |
| Category: | Dynamic Link Library |
| Syntax | |
| Arguments | |
| Details | |
| Comparisons | |
| Examples | |
| Example 1: Using the CALL MODULE Routine | |
| Example 2: Using the MODULEIN Function in the IML Procedure | |
| Example 3: Using the MODULEN Function | |
| See Also | |
Syntax |
| CALL MODULE(<cntl-string,>module-name<,argument-1, ..., argument-n>); |
![[cautend]](../common/images/cautend.gif)
| Details |
For more information on the attribute table, see SAS Language Reference: Concepts.
![[cautend]](../common/images/cautend.gif)
| Comparisons |
Two DLL CALL routines and four DLL functions share identical syntax:
| Examples |
This example calls the
xyz routine. Use the following attribute table:
routine xyz minarg=2 maxarg=2; arg 1 input num byvalue format=ib4.; arg 2 output char format=$char10.;
The following is the sample SAS code that calls the
xyz function:
data _null_;
call module('xyz',1,x);
run;
This example invokes the
changi routine from the TRYMOD.DLL module. 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 PROC IML code calls the
changi function:
proc iml;
x1=J(4,5,0);
do i=1 to 4;
do j=1 to 5;
x1[i,j]=i*10+j+3;
end;
end;
y1=x1;
x2=x1;
y2=y1;
rc=modulein('*i','changi',6,x2);
This example calls the
Beep routine, which is part of the Win32 API in the USER32 Dynamic
Link Library. Use the following attribute table:
routine Beep minarg=2 maxarg=2 stackpop=called callseq=byvalue module=user32; arg 1 num format=pib4.; arg 2 num format=pib4.;
The following is the sample SAS code that calls the
Beep function:
filename sascbtbl 'sascbtbl.dat';
data _null_;
rc=modulen("Beep",1380,1000);
run;
The previous code causes the computer speaker to beep.
| See Also |
CALL Routine:
|
Functions:
|
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.