View previous topic :: View next topic |
Author |
Message |
infoman123 Beginner
Joined: 02 Nov 2004 Posts: 57 Topics: 20
|
Posted: Fri Apr 02, 2010 5:57 am Post subject: Cics and address space |
|
|
Hi All,
Suppose there is a program A having work storage work-var and comm area variable comm-var and the transaction txn1 for this is executed (task1).
After sometime another task, task2 is executed, but suppose this also got the same address location which the working storage and comm area occupied for task1, will the variables of program A inherit the values used in task1.
My understanding is, task 1 will release the address space used after the completion of task, but will it initiliaze and release or just free up the space.
The reason I am asking is one variable is there in program A which is not initialized, and sometimes the program is abending due to the reason, its having invalid value.
Regards |
|
Back to top |
|
|
CraigG Intermediate
Joined: 02 May 2007 Posts: 202 Topics: 0 Location: Viginia, USA
|
Posted: Fri Apr 02, 2010 6:54 am Post subject: |
|
|
Use of unintialized working storage variables is a very poor practice and you are getting what you deserve! |
|
Back to top |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Fri Apr 02, 2010 10:28 am Post subject: |
|
|
To quote an old IBM caution:
Quote: | The results may be unpredictable. . . |
Unpredictable = unacceptable
Fix the code. . . _________________ All the best,
di |
|
Back to top |
|
|
infoman123 Beginner
Joined: 02 Nov 2004 Posts: 57 Topics: 20
|
Posted: Sun Apr 04, 2010 7:22 am Post subject: |
|
|
So Can i confirm than cics will not initilaize the memory when it releases the address space. |
|
Back to top |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Sun Apr 04, 2010 10:25 am Post subject: |
|
|
When memory is released, there is nothing to initialize. . . _________________ All the best,
di |
|
Back to top |
|
|
icbc Beginner
Joined: 01 Aug 2010 Posts: 1 Topics: 0
|
Posted: Thu Aug 05, 2010 9:41 am Post subject: |
|
|
I do not think this have any relationship to the address space,it is program level problem,it is a good habit that initialize any variable before you use it,or you can set you LE option STORAGE=((NONE,NONE,00,0K) ,it will initialize the storage to x'00' value as the program initializing |
|
Back to top |
|
|
warp5 Intermediate
Joined: 02 Dec 2002 Posts: 429 Topics: 18 Location: Germany
|
Posted: Tue Aug 10, 2010 7:38 am Post subject: |
|
|
Using the LE option might work, but what happens if the program is run on a different system and the LE option is not set like that. The correct method is for the program to be correctly programmed. |
|
Back to top |
|
|
|
|