View previous topic :: View next topic
|
Author |
Message |
PKumar
New User
Joined: 28 Sep 2004 Posts: 8
|
|
|
|
Hi,
I know from seeing the jcl we can find whether it is a static call or a dynamic call to a called module. But is there any valid method which helps to identify whether the called module is called thru Statically or Dynamically.
Also pl help me by seeing load module of the calling program how people are finding whether the sub program is called dynamically or statically. As generally load module contains some machinery codes which a user cant understand.
All possible feedback's are welcome. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
PKumar wrote: |
I know from seeing the jcl we can find whether it is a static call or a dynamic call to a called module. |
From the JCL? Please explain.
Quote: |
But is there any valid method which helps to identify whether the called module is called thru Statically or Dynamically. |
If the module name is known to the compiler, like wrapped in quotes in the CALL statement, it is probably static, i.e., linked into the main program. If it is not known to the compiler, like in a dataname used in the CALL statement, it is definitely dynamic.
Quote: |
Also pl help me by seeing load module of the calling program how people are finding whether the sub program is called dynamically or statically. |
Looking at the load module, you could see evidence of the statically linked module in the load module.
Quote: |
As generally load module contains some machinery codes which a user cant understand. |
Huh? Please explain. |
|
Back to top |
|
|
arindam111
New User
Joined: 29 Nov 2006 Posts: 27 Location: India
|
|
|
|
regarding your first question, in cobol if you declare a call like this:
Code: |
05 MYPGM PIC X(8) VALUE "A1256CTB"
........
CALL MYPGM USING .....
|
Then its a DYNAMIC call.
If you do like this:
Code: |
CALL "A1256CTB" USING ....
|
Then its a STATIC call.
regarding your second question, when a load module is generated, it contains the CSECTS (code sections) of all statically modules. Lode module doesnt contains the CSECTS of dynamically called modules, those are resolved during runtime i.e. execution of your COBOL load.
From FILEAID you can see the CSECTS map i.e. statically modules. Go to 3.1 Library Utility, give the load library name with your member name, it'll display all CSECTS under it. |
|
Back to top |
|
|
PKumar
New User
Joined: 28 Sep 2004 Posts: 8
|
|
|
|
Thank you Arindam. Now i understood how to find out the ways of identifying whether statically called or dynamically loaded. |
|
Back to top |
|
|
vishabus
New User
Joined: 25 Oct 2006 Posts: 24 Location: India
|
|
|
|
If you do like this:
Code: |
CALL "A1256CTB" USING ....
|
Then its a STATIC call.
I am not very sure but there is one compile option like DYNAM/NODYNAM which governs if the above call is DYNAMIC/STATIC. I mean this type of call only facilitates but doesn't gurantee a static call. Correct me if I am wrong. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
vishabus wrote: |
I am not very sure but there is one compile option like DYNAM/NODYNAM which governs if the above call is DYNAMIC/STATIC. I mean this type of call only facilitates but doesn't gurantee a static call. |
I may be wrong too, but that is the way I understand it. Good call. |
|
Back to top |
|
|
|