Import and Export Concepts
- Weak data exports
- Weak data imports
- Strong data exports
- Strong data imports
- Strong procedure exports
- Weak procedure exports
- Procedure imports
- The binder uses the characteristics of the strong export, if one or more weak exports have the same name.
- If a weak export does not have the same name as a strong export, you cannot set its characteristics until activation time. At activation time, if multiple weak exports with the same name exist, the program uses the largest one. This is true, unless an already activated weak export with the same name has already set its characteristics.
- At bind time, if a binding directory is used, and weak exports are found to match weak imports, they will be bound. However, the binding directory is searched only as long as there are unresolved imports to be resolved. Once all imports are resolved, the search through the binding directory entries stops. Duplicate weak exports are not flagged as duplicate variables or procedures. The order of items in the binding directory is very important.
You can export weak exports outside a program object or service program for resolution at activation time. This is opposed to strong exports that you export only outside a service program and only at bind time.
- Imports in a program that binds the service program by reference.
- Imports in other service programs that are bound by reference to that program.
Service programs define their public interface through binding source language.
You can make weak procedure exports part of the public interface for a service program through the binding source language. However, exporting a weak procedure export from the service program through the binding source language no longer marks it as weak. It is handled as a strong procedure export.
You can only export weak data to an activation group. You cannot make it part of the public interface that is exported from the service program through the use of binder source language. Specifying weak data in the binder source language causes the bind to fail.
ILE Languages | Weak Data Exports | Weak Data Imports | Strong Data Exports | Strong Data Imports | Strong Procedure Exports | Weak Procedure Exports | Procedure Imports |
---|---|---|---|---|---|---|---|
RPG IV | No | No | Yes | Yes | Yes | No | Yes |
COBOL2 | Yes3 | Yes3 | No | No | Yes1 | No | Yes |
CL | No | No | No | No | Yes1 | No | Yes |
C | No | No | Yes | Yes | Yes | No | Yes |
C++ | No | No | Yes | Yes | Yes | Yes | Yes |
Note:
|