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
 

 

Cobol Call Query

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Cobol Call Query
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: 8055
Location: East Dubuque, Illinois, USA

PostPosted: Thu Apr 22, 2010 6:03 pm    Post subject:
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

Active Member


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

PostPosted: Thu Apr 22, 2010 6:11 pm    Post subject:
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: 6967
Location: porcelain throne

PostPosted: Thu Apr 22, 2010 6:22 pm    Post subject:
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: 1228
Location: Israel

PostPosted: Thu Apr 22, 2010 8:08 pm    Post subject:
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    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
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm


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