Binding Large Numbers of Modules
Binding Large Numbers of Modules
For the module (MODULE) parameter on the CRTPGM and CRTSRVPGM commands, there is a limit on the number of modules you can specify. If the number of modules you want to bind exceeds the limit, you can use one of the following methods:
- Use binding directories to bind a large number of modules that provide exports that are needed by other modules.
- Use a module naming convention that allows generic module names
to be specified on the MODULE parameter on the CRTPGM and CRTSRVPGM
commands. For example,
CRTPGM PGM(mylib/payroll) MODULE(mylib/pay*). All modules with names starting withpayare unconditionally included in the programmylib/payroll. Therefore, pick your naming convention carefully so that the generic names specified on the CRTPGM or CRTSRVPGM commands do not bind unwanted modules. - Group the modules into separate libraries so that the value *ALL
can be used with specific library names on the MODULE parameter. For
example,
CRTPGM PGM(mylib/payroll) MODULE(payroll/*ALL). Every module in the librarypayrollis unconditionally included in the programmylib/payroll. - Use a combination of generic names and specific libraries that are described in method 2 and 3.
- For service programs, use the binding source language. An export specified in the binding source language causes a module to be bound if it satisfies the export. The RTVBNDSRC command can help you create your binding source language. Although the MODULE parameter on the RTVBNDSRC command limits the number of modules that can be explicitly specified on the MODULE parameter, you can use generic module names and the value *ALL with specific library names. You can use the RTVBNDSRC command multiple times with output directed to the same source file. However, you may need to edit the binding source language in this case.