Entry Point Mapping for COBOL Programs

The Entry Point Mapping facility enables you to specify entry points in COBOL programs so that the application can find them at run time. You need to do this for any entry points in programs which will not have been loaded prior to them being called.

To appreciate the functions that this facility performs, you need to understand how calls to entry points are normally resolved using the run-time system.

When a program makes a call to an entry point in which the entry point has not been resolved by statically linking the program, the run-time system looks for the entry point to resolve it dynamically.

When a program is loaded, the name of the program and all the entry points in the program are recorded in a table. When a call to an entry point is made, the run-time system searches the table for the entry point-name. If it does not find the entry point-name, it looks on disk for an executable file of the same name. If it does not find one it returns an error.

Consequently, if your program calls an entry point that is not the name of an executable file or is not an entry point in a previously loaded program, the run-time system cannot find the entry point and your program fails. This is the only case where you need to use the Entry Point Mapper.

This problem often occurs when you take code that has been downloaded from a mainframe to the PC for further development. Mainframe programs often have several entry points in a single program. On the mainframe, entry points are resolved by linking, so calls can be made to a program and the entry point located whether or not the program has been called.

Using Enterprise Developer, if the program containing the entry point has not already been called, the call to that entry point fails.

To get round this problem, you need to create an entry name map file containing an entry point table and make it available to the run-time system.