Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In most cases, you can use the techniques presented in this chapter to implement simulations that are written entirely in the SAS/IML language. As the examples in this chapter demonstrate, the SAS/IML language enables you to simulate complex events such as dice games and the matching birthday problem. However, as indicated in Section 13.9.4, some simulation problems require generating many millions of samples. Furthermore, the analysis that you perform on each sample might be very time consuming. (In Section 13.9.4, the "analysis" consists of simply counting the number of matching birthdays.) In circumstances such as these, you might decide to write a portion of your program in the C programming language, compile the code into a Windows DLL, and call the C function from within SAS/IML Studio.
The process of how to compile and call a C function from a Windows DLL is explained in the SAS/IML Studio online Help. To view the documentation in the SAS/IML Studio Help: