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
 

 

Storing value in called program for next time usage.

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

New User


Joined: 20 Aug 2009
Posts: 1
Location: Hyderabad

PostPosted: Thu Aug 20, 2009 6:35 pm    Post subject: Storing value in called program for next time usage.
Reply with quote

I'm writing a cobol-db2 called program in which I wish to store a field value. I want to reuse that value again in this program only but the condition is that I want this value when the control comes back into called program for 2nd time.
I don't want to use this fields value in calling program. Don't want to use file or table for this purpose.

example: Calling prog -A, called prog-B
A calls B -> 1st time, store value in Identity as '111'
B returns control back to A
A calls B -> 2nd time, check value in Identity - it should be '111'
Back to top
View user's profile Send private message

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Aug 21, 2009 1:25 am    Post subject: Reply to: Storing value in called program for next time usag
Reply with quote

I think this post needs to be transferred to the appropriate forum.

Bill
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Aug 21, 2009 2:53 am    Post subject:
Reply with quote

Hello,

Quote:
I don't want to use this fields value in calling program. Don't want to use file or table for this purpose.
Now that you've ruled out the "normal" ways to do this, what do you have in mind?

I suppose you could write some callable assembler code that would allocate/update/read a bit of memory dynamically. Your management might not allow this to be promoted to production, but i suppose you could write it. . .
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1280
Location: Belgium

PostPosted: Thu Aug 27, 2009 3:11 pm    Post subject:
Reply with quote

It's been a while since I tried this, so my info might be wrong

Keeping the WS off the called pgm could be normal behaviour.

I'm not sure what influences this. It has something to do with "CANCEL","INITIAL" or some compile option.

I guess you could just try it.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Aug 30, 2009 9:10 pm    Post subject:
Reply with quote

Hi Mampta,

Will the value of "identity" change with each exec of pgm A? Will it change when pgm X execs pgm B? Is the value developed in pgm B? Or is "111" always the value of "identity"?
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 755
Location: Germany

PostPosted: Mon Aug 31, 2009 1:39 pm    Post subject:
Reply with quote

Morning MamtaP !

Just try the way you told us. The working storage fields are still kept, if your programm is not reantrant.
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 Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts CICS transaction slow response time vasanthz All Other Mainframe Topics 3 Thu Jan 19, 2017 1:31 am
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm


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