I have a cobol program that's calling an assembler module. The assembler module has 4 entry points in it. The assembler module is dynamically called from the cobol program.
When I assemble my assembler program, only 1 load module with the name of CSECT is created in my library. When I try running the cobol program from my library the cobol program gets called ok but I get an S806(load module not found) for the assembler module.
I checked the production load library. It has 4 different modules with the names of the 4 respective entry points for the assembler routine. When I run using production library then all goes fine.
Does this mean that it's not possible to dynamically call an entry point of a module?
I have now planned to create 4 different modules with the 4 entry names in my library. I will add a branch statement as the first instruction in all these programs so that it branch to the desired entry point. Please suggest if there is a better approach.