Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Dynamically calling a module that has 4 entry points?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: Dynamically calling a module that has 4 entry points?
Reply with quote

I saw this thread which already talks about the issue.
http://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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Thu Nov 03, 2011 12:30 am    Post subject: Reply to: Dynamically calling a module that has 4 entry poin
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7254

PostPosted: Thu Nov 03, 2011 2:24 am    Post subject: Reply to: Dynamically calling a module that has 4 entry poin
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7254

PostPosted: Thu Nov 03, 2011 3:08 am    Post subject: Reply to: Dynamically calling a module that has 4 entry poin
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    Post subject: Re: Reply to: Dynamically calling a module that has 4 entry
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    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts Need points to tune IMS Checkpoint Pr... satish.ms10 IMS DB/DC 2 Fri Sep 30, 2016 4:12 pm
No new posts Copybook structure in Load module Vai123 COBOL Programming 7 Fri Sep 16, 2016 8:29 pm
No new posts how to DYNAMICALLY write sort cond to... mohamedmubee COBOL Programming 13 Fri Aug 26, 2016 11:46 pm
No new posts Automation of data entry using Rexx i... zingy.rajeev CLIST & REXX 4 Mon Aug 22, 2016 4:13 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us