Problem:
If you wish to call an assembler module where the CSECT name differs from the program name (*.MLC name), you will need to employ one of the following methods depeding on whether you are calling the module statically or dynamically.
Using the demo found in MFUSER\\PROJECTS\\GSDEMO\\AMULDEMO as an example and assuming that the source file MFCALL.mlc is called MFCALLX.mlc for the purposes of this explanation.
Resolution:
To statically link a different version of the called MFCALL.OBJ module, create a linker command file for the calling program such as MFPROG.LIN and add an INCLUDE statement for the required object module. For example, the following would include MFCALLX.OBJ module to resolve the reference to MFCALL:
INCLUDE MFCALLX
To dynamically link to a separate load module such as MFCALLX.390, first add a new linker command file MFCALLX.LIN with the command:
ALIAS MFCALL
This will create a load module named MFCALLX.390 with an alias entry point MFCALL defined in the MFENTMAP directory. Second change the linker command file for the calling program such as MFPROG.LIN to the following command:
INCLUDE MFCALL,TYPE=CBL
This will generate a dynamic call stub for MFCALL in the MFPROG.390 load module such that when the MFCALL stub is called, a dynamic link will be issued to MFCALL. The dynamic call will result in the MFCALLX module being loaded and entered at the alias entry point MFCALL.
When using dynamic calls, be sure the required load module is correctly defined in the load module library dependencies and that there are no conflicts with entries for other load modules.
Note - At present, you cannot use Zoom when debugging an application that dynamically calls a submodule with a differnet name to the entry point. Use Go or Quiet instead. This issue is resolved in the next Mainframe Express fixpacks due for publication in January 2004.
#MFDS
#EnterpriseDeveloper