MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

cancel the dynamic callee to inz the WS variables.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
ds390
Beginner


Joined: 23 Jan 2007
Posts: 82
Topics: 39

PostPosted: Mon Jul 23, 2007 11:37 pm    Post subject: cancel the dynamic callee to inz the WS variables. Reply with quote

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
View user's profile Send private message
blitz2
Beginner


Joined: 23 Jan 2007
Posts: 84
Topics: 14

PostPosted: Tue Jul 24, 2007 1:13 am    Post subject: Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Jul 24, 2007 1:24 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group