Sign in

docs ILE Concepts

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:

  1. Use binding directories to bind a large number of modules that provide exports that are needed by other modules.
  2. 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 with pay are unconditionally included in the program mylib/payroll. Therefore, pick your naming convention carefully so that the generic names specified on the CRTPGM or CRTSRVPGM commands do not bind unwanted modules.
  3. 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 library payroll is unconditionally included in the program mylib/payroll.
  4. Use a combination of generic names and specific libraries that are described in method 2 and 3.
  5. 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.