IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Dynamically calling a module that has 4 entry points?


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nigelosberry

New User


Joined: 06 Jan 2009
Posts: 88
Location: Ggn, IN

PostPosted: Thu Nov 03, 2011 12:14 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Nov 03, 2011 12:30 am
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Nov 03, 2011 2:24 am
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Nov 03, 2011 3:08 am
Reply with quote

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
View user's profile Send private message
nigelosberry

New User


Joined: 06 Jan 2009
Posts: 88
Location: Ggn, IN

PostPosted: Thu Nov 03, 2011 6:01 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Calling an Open C library function in... CICS 1
No new posts Dynamically pass table name to a sele... DB2 2
No new posts calling a JCl inside a JCL JCL & VSAM 3
Search our Forums:

Back to Top