Problem:
Whenever we CALL an alternate entry point in our Cobol application, we get error RTS173 issued for the entry name. How can we resolve this?
Resolution:
We have provided MFENTMAP for many years but it has gone thru a few changes for Enterprise Developer you might notice if you had used it previously.
First, one needs to create a mfentmap.dat file. It is an ASCII text file, so any text editor can be used. The format is:
[ENTRY-POINT] the name of the CALLed alternate entry point in the sub-program
[PROGRAM-NAME] the name of the program issuing the CALL (if a '*' is used it can be any program)
[SUNPROGRAM-NAME] the name of the sub-program which contains the alternate entry point to be loaded
If you have an older file it may start with a header line such as: [COBENTSN Vrn2.0.00nrV]. It is no longer required and ignored if still present. So a sample file could look like this:
# this is a comment line
[ENTRY-POINT] ALTENT55
[PROGRAM-NAME] MAIN68
[SUBPROGRAM-NAME] SUBP74
[ENTRY-POINT] ALTENT90
[PROGRAM-NAME] *
[SUBPROGRAM-NAME] SUBP16
Note the '#' symbol is used for a comment line.
In this example, when program MAIN68 calls the alternate entry point ALTENT55, program SUBP74 will be loaded. When any program calls ALTENT90 then program SUBP16 will be loaded.
Second, we need to point to the mfentmap.dat and have it activated for the Micro Focus runtime. In the ES Server under Server > Properties > General, in the Configuration Information area, add something like this example:
[ES-Environment]
cobconfig_=c:\\Examples\\CobCfgDir\\cobcfg.txt
entrynamemap=c:\\Examples\\ENTMAPDIR
Where cobcfg.txt contains: set entry_point_mapper=TRUE
The file extension can be .txt or .cfg. And 'TRUE' must be upper case. The rest should not matter.
Take note of that trailing '_' in cobconfig. In Enterprise Developer v3.0, we no longer require it, so it can be coded as: cobconfig=c:\\Examples\\CobCfgDir\\cobcfg.txt
entrynamemap can be lower or upper case and it points to the directory that contains the mfentmap.dat file.
Lastly, note that if a Cobol program is CALLed by its main entry point first, then all alternate entry points in it are known to the Micro Focus runtime because they are now in storage and any reference to calling an alternate entry point name used in that program will result in using the copy already in storage and no other programs will be searched for or loaded. For instance, in this example, if a program higher up the calling sequence had called a different program that had the entry point ALTENT55, then that program would be used when program MAIN68 tried to call SUBP74.
#EnterpriseDeveloper
#MFDS
