View previous topic :: View next topic
|
Author |
Message |
nigelosberry
New User
Joined: 06 Jan 2009 Posts: 88 Location: Ggn, IN
|
|
|
|
I saw this thread which already talks about the issue.
ibmmainframes.com/about44490.html
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. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
already discussed a few times ...
COBOL dynamic call requires that the names of the load module and the entry point be the same period
most probably there is one REAL load module and the other are just ALIASES . |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Try defining an ALIAS of the assembler load module for each entry-point (Linkage Editor ALIAS).
Run your Cobol problem. Let us know the result. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
If that assmbler module is not used by another assembler program, I'd suggest changing it whether it works or not with the Alias.
A field of some sort, to indicate the particular function required, a la dbz's point in the thread you referred to. Then do away with the entry points.
If used elsewhere, you have more thinking to do when you know how in how many places it is used. |
|
Back to top |
|
|
nigelosberry
New User
Joined: 06 Jan 2009 Posts: 88 Location: Ggn, IN
|
|
|
|
Thanks for the input experts.
I have changed my cobol program to have the call as a static call and relinked the 2 programs. Now its running fine.
this module is used by only 2 programs. The other one too has got this assembler module statically linked to it. |
|
Back to top |
|
|
|