View previous topic :: View next topic |
Author |
Message |
ds390 Beginner
Joined: 23 Jan 2007 Posts: 82 Topics: 39
|
Posted: Mon Jul 23, 2007 11:37 pm Post subject: cancel the dynamic callee to inz the WS variables. |
|
|
I heard a lot of people say, cancel a dynamic called pgm will result in the working storage of the called pgm initailized next time it's called. But, I have found that under the following condition
1. no INITIAL in the program-id in the called pgm.
2. no VALUE in the ws section in the called pgm.
3. no other calls between the CANCEL and next CALL in the calling pgm.
The working storage will remain the same as last time it's called.
Has anyone ever experienced the same? I think it's very strange. How can I have a clean working storage in the called pgm without using INITIAL and VALUE statments? |
|
Back to top |
|
 |
blitz2 Beginner

Joined: 23 Jan 2007 Posts: 84 Topics: 14
|
Posted: Tue Jul 24, 2007 1:13 am Post subject: |
|
|
Are you looking for LOCAL-STORAGE?
________
Wiki vaporizer
Last edited by blitz2 on Thu Mar 10, 2011 5:32 pm; edited 1 time in total |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue Jul 24, 2007 1:24 am Post subject: |
|
|
The 'cleaning of working storage' is a function of switches set by the compiler. The program loader, loads a program based on the setting of these switches. IBM stated many years ago, that the loader will no longer provide clean storage (set to binary zero) without being requested to do so by the module to be loaded. Apparently, the loader would 'clean' storage and then load the module. Point is, do not rely on it.
yes, I have encountered this behaviour - CALLed, CANCELed, re-CALLed module being loaded into the same space, but in an debugger envoirnment where the memory is actually allocated to the debugger as a run-unit and not the modules being debugged. A lot depends upon the load in the machine. It is conceivable that a run-unit will be re-assigned the same memory when it receives its time-slice, especially if it was not necessary to swap the complete run-unit out. But, don't rely on it.
by the way Quote: | The working storage will remain the same as last time it's called.
Has anyone ever experienced the same? I think it's very strange. How can I have a clean working storage in the called pgm without using INITIAL and VALUE statments? |
you have said two different things here: 'remain the same' and 'clean working storage'. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
|
|