IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Cobol Call Query


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sibi Yohannan

New User


Joined: 15 Apr 2009
Posts: 47
Location: Bangalore

PostPosted: Thu Apr 22, 2010 5:55 pm
Reply with quote

Hi,

Please help me with the below query on Cobol Call, correct me if I am wrong.

PGM-A Calls PGM-B multiple times within PGM-A.

When PGM-B is called multiple times, the variables used by PGM-B will be initialized by the System ? If it is not reinitialized how to get that re-initialized whenever the PGM-B is called.

Please advice

Thanks
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Apr 22, 2010 6:03 pm
Reply with quote

What research have you done in the COBOL manuals so far?
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Thu Apr 22, 2010 6:11 pm
Reply with quote

Or perhaps a simple test?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 22, 2010 6:22 pm
Reply with quote

either employ the INITIAL clause explained here

Or

have code initializing your working-storage each time you enter the module.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Thu Apr 22, 2010 8:08 pm
Reply with quote

I am still trying to promote the use of LOCAL-STORAGE SECTION,
although I have yet to use it myself...

From the cobol book:
Quote:
The local-storage section defines storage that is allocated and freed on a per-invocation basis. On each invocation, data items defined in the local-storage section are reallocated. Each data item that has a VALUE clause is initialized to the value specified in that clause.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top