Modules
A module object is a nonrunnable object that is the output of an ILE compiler. A module object is represented to the
system by the symbol *MODULE and is the basic building block for creating runnable ILE objects. You can bind modules into
service programs (*SRVPGM).
Using Modules has it's advantages:
- Modules are easier to maintain. It is easier to maintain a small module representing a single function than to
maintain an entire program. For example, if you change only a line or two in a module, you may only need to
recompile the module, rather than the entire program.
- Modules are easier to test. Testing of functions can be done in isolation. You do not have to run the entire
program. A test harness which includes the module under test can be used instead.
- Modules are easier to code. You can subdivide the work into smaller source members rather than coding an
entire program in a single source file.
- Modules can be reused in different application programs.