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

Storing value in called program for next time usage.


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Aug 21, 2009 1:25 am
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

Moderator Emeritus


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

PostPosted: Fri Aug 21, 2009 2:53 am
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: 1281
Location: Belgium

PostPosted: Thu Aug 27, 2009 3:11 pm
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
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: 771
Location: Germany

PostPosted: Mon Aug 31, 2009 1:39 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts C Compile time time stamps Java & MQSeries 10
No new posts Parallelization in CICS to reduce res... CICS 4
Search our Forums:

Back to Top