View previous topic :: View next topic
|
Author |
Message |
MamtaP
New User
Joined: 20 Aug 2009 Posts: 1 Location: Hyderabad
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
I think this post needs to be transferred to the appropriate forum.
Bill |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
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 |
|
|
|