Example 4: External Name Changes [ HP COBOL II/XL Migration Guide ] MPE/iX 5.0 Documentation
HP COBOL II/XL Migration Guide
Example 4: External Name Changes
This example shows how you would change a program because of the way the
COBOL II/XL compiler treats external names.
If a subprogram is defined as follows:
$CONTROL SUBPROGRAM
PROGRAM-ID. GET-NEXT-RECORD.
.
.
PROCEDURE DIVISION.
.
.
ENTRY "GET-AND-CHECK-NEXT-RECORD".
.
.
the following CALL statements from a main program will fail because the
external names are different.
CALL "GETNEXTRECORD".
CALL "GET-AND-CHECK-NEXT-REC".
The loader issues the following error message at run-time:
Loader failed because of unsatisfied externals:
getnextrecord
get_and_check_next_rec
The calls should be changed to:
CALL "GET-NEXT-RECORD".
CALL "GET-AND-CHECK-NEXT-RECORD".
Or the PROGRAM-ID and ENTRY should be changed to:
PROGRAM-ID. "GETNEXTRECORD".
ENTRY "GET-AND-CHECK-NEXT-REC".
Another option is to use $CONTROL CMCALL as described in Chapter 2.
MPE/iX 5.0 Documentation