Language Reference |
define a module
The START statement instructs IML to enter a module-collect mode to collect the statements of a module rather than execute them immediately. The FINISH statement signals the end of a module. Optionally, the FINISH statement can take the module name as its argument. When no name argument is given in the START statement, the module name MAIN is used by default. If an error occurs during module compilation, the module is not defined. See Chapter 5 for details.
The following example defines a module named MYMOD that has two local variables (A and B) and two global variables (X and Y). The module creates the variable Y from the arguments A, B, and X.
start mymod(a,b) global(x,y); y=a*x+b; finish;
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.