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
 

 

Doubts on dynamic call

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

New User


Joined: 10 Jun 2006
Posts: 2
Location: India

PostPosted: Sat Jun 10, 2006 12:09 pm    Post subject: Doubts on dynamic call
Reply with quote

Hi,

Can anybody help me to know that why all the working storage variables of a dynamically called program is reinitialized when it is called again.Which is not the case in static call unless and until you overwrite it.
Back to top
View user's profile Send private message

calspach

New User


Joined: 05 May 2006
Posts: 32
Location: USA

PostPosted: Sun Jun 11, 2006 2:50 am    Post subject:
Reply with quote

That's just one of the features between a dynamic and a static. One of the reasons why you choose which you should use.
Back to top
View user's profile Send private message
Manish Kumar Agrawal

New User


Joined: 10 Jun 2006
Posts: 2
Location: India

PostPosted: Mon Jun 12, 2006 12:52 pm    Post subject:
Reply with quote

Hi calspach

I can't get u.Can u specify me in detail.
Back to top
View user's profile Send private message
calspach

New User


Joined: 05 May 2006
Posts: 32
Location: USA

PostPosted: Mon Jun 12, 2006 6:56 pm    Post subject:
Reply with quote

When you dynamically call a program, the program that is called is pulled into memory each time it's called. Therefore that re-initializes all the variables each time it's called. If you make changes to the called program and recompile it, those changes will be seen the next time you call it.

When you do a static call, the program that is called is pulled into the calling program when you compile. Therefore, you don't need to re-initialize the variables each time it's called, cause it only belongs to the one program that it's a part of. When it's static, its like the called program actually becomes part of the calling program. If you make changes to the called program but don't recompile the calling, your changes won't be seen.
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Mon Jun 12, 2006 7:09 pm    Post subject: Re: Doubts on dynamic call
Reply with quote

Manish Kumar Agrawal,

Quote:

Can anybody help me to know that why all the working storage variables of a dynamically called program is reinitialized when it is called again.Which is not the case in static call unless and until you overwrite it.


Normally, Dynamic called subprograms do not reinitialize the working storage variables. The first time the subprogram is called it is loaded into memory, and stays there until the calling program ends. There are two exceptions. 1 ? you specified the ?INITIAL? attribute on the subprogram, or 2 - the calling program did a ?CANCEL? of the subprogram.

Check these three links.

Dynamic CALL Statement

PROGRAM-ID Paragraph

CANCEL Statement

Dave
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 REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Need help in triggering a PL1 module ... Varungv99 IMS DB/DC 0 Fri Apr 07, 2017 10:01 am


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