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
 

 

Regarding identifying whether Static/Dynamic cal from code

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
PKumar

New User


Joined: 28 Sep 2004
Posts: 8

PostPosted: Mon Feb 19, 2007 5:19 pm    Post subject: Regarding identifying whether Static/Dynamic cal from code
Reply with quote

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

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon Feb 19, 2007 5:33 pm    Post subject: Re: Regarding identifying whether Static/Dynamic cal from co
Reply with quote

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

New User


Joined: 29 Nov 2006
Posts: 27
Location: India

PostPosted: Mon Feb 19, 2007 5:36 pm    Post subject:
Reply with quote

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. icon_biggrin.gif
Back to top
View user's profile Send private message
PKumar

New User


Joined: 28 Sep 2004
Posts: 8

PostPosted: Mon Feb 19, 2007 6:05 pm    Post subject:
Reply with quote

Thank you Arindam. Now i understood how to find out the ways of identifying whether statically called or dynamically loaded.
Back to top
View user's profile Send private message
vishabus

New User


Joined: 25 Oct 2006
Posts: 24
Location: India

PostPosted: Thu Feb 22, 2007 2:27 am    Post subject:
Reply with quote

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

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Feb 22, 2007 3:31 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts CA Workload Automation event code help vinu78 CA Products 10 Wed Mar 01, 2017 10:05 am
No new posts MAX-RC 88 and Return code 606 in DFH0... lind sh CICS 2 Tue Jan 24, 2017 1:23 pm
No new posts Dynamic array request/response contai... Suja.Sai CICS 2 Tue Jan 24, 2017 11:37 am


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