View previous topic :: View next topic
|
Author |
Message |
imain Warnings : 1 New User
Joined: 25 Jun 2006 Posts: 14 Location: US
|
|
|
|
Hi,
How to identify STATIC and DYNAMIC calls by seeing LOAD MODULE?
Thank you |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
There must be something more to the question.
A "CALL LITERAL" is static unless you compile with the DYNAM compiler-option. All other calls are dynamic anyway.
If you have the compile listing, this, sort of, answers your quesiton, although the looking-at-the-loadmodule bit just becomes entertainment whilst sipping coffee.
If you don't have the compile listing, it is possible from the loadmodule to tell what the compile options were for any given program. I assume you have the source code. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
Please rephrase your question in such a way that we, mere mortals, can also understand what you mean with the above gibberish. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
unfortunately, even though a load module is 'marked' to be dynamically CALLed,
if some clown does a CALL literal to a model,
after the Linkeditor has finished processing the modul BINDing process,
the 'dynamically CALLed module' is now part of the run unit.
thus, effectively requiring a relinking of the run unit if the submodule changes.
if I were you, I would deal with AMBLISTs which will tell you what is statically linked in the run unit.
you can cross-reference this
with a CALL search in you souce code,
don't forget copybooks containing CALL statements. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Dick,
Yes, AMBLIST is the better way to go....
Mr. Bill |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
IMHO looking at the load module the only thing that can be seen is the CSECT listing some CSECT information and the XREF of the ESD
noo way to find the names of the DYNAMICALLY CALLED <things> |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
but by looking at the amblist you can generate a list of all those CALLed Statically,
then with the all CALL list generated by source and copybook search
remove the static (from amblist) from all CALL and you have dynamic.
parse and joinkeys usually does the trick. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
imain, are you ready yet to tell us more about what you are after?
If you look at what enrico wrote, the "static" part is easy. If, up in those first records of the load module, you see any of "your" modules, then they are statically called.
All the other modules called by your load module, are called dynamically.
Of course, you have to look at the load modules of those that are called dynamically to get a full picture, because they may also include statically called modules. And you then have to look at the modules which those call dynamically. Repeat until fade.
Can you identify the dynamic calls by looking at the load module?
If you are using CALL data-name, no, or not without knowledge of the source.
If you are using CALL literal, then yes, you can identify them from the load module by looking at it, with care and in a not-so-convenient way.
You have to find the start of each module (you will likely have the literal CEE very near the actual start of your modules, but generate the full compile listing (compiler option LIST) and have a look at what the start looks like for your particular compiler version). You have to then find the start of the "literal pool" (or pools) which are almost immediately after the START code for the module. Fairly early on in the literal pool, of each module, you will see a list of all the CALL literal programs, in the reverse order to the physical order in the source.
This is because if you are using CALL literal with DYNAM compiler option, the literal has to exist in your module to satisfy the call, and the place it exists is in the literal pool (strictly, the CGT one). Have a look at your compile listing, It shows the literal pool, you'll see the module names (if you are using DYNAM).
It is far from a good thing to mix static and dynamic calls. It is even worse if you mix with the calling of the same module the two different ways. You can too easily end up with different versions of the same module if you faill to re-link all the load modules where a module is called statically.
I assume you have some particular problem which you are looking at? Would you like to tell us some more about it, or let us know if any of the information we have provided is any use to you? |
|
Back to top |
|
|
|