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 

Initialization of Working storage variables

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


Joined: 19 Sep 2005
Posts: 21
Topics: 11

PostPosted: Wed Sep 06, 2006 8:32 pm    Post subject: Initialization of Working storage variables Reply with quote

There is a Batch program X which reads a table to read a list of client IDs. After each Client ID is fetched, it will read another table that contains the names of the programs. After each Fetch the respective program. Say A,B,C is excuted and the Client ID is processed.
I have set some Switch (Working Storage Variable) in Program A. Once all the programs are executed, the next client ID is read from the table. Now again the Program A is read and executed once again.

My question:-
Is it possible that the Switch is not initailized when it enters the program A again?

Normally the working storage variables gets initialized. But is there any Compilation Parms that would make these variables static when re-enter the same program.
(Since, the program is called after reading Db2 Table, I guess it is a Dynamic call.so the working storage variables shud be initialized as per my understanding. But I am not sure if this can be made static through some compilation Parameters)

Any pointers on this is highly appreciated.

Thanks.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12382
Topics: 75
Location: San Jose

PostPosted: Wed Sep 06, 2006 9:28 pm    Post subject: Reply with quote

pai_sunil_bs,


Please search before posting. Check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=3788&highlight=initial

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
pai_sunil_bs
Beginner


Joined: 19 Sep 2005
Posts: 21
Topics: 11

PostPosted: Wed Sep 06, 2006 10:00 pm    Post subject: Reply with quote

Thanks Kolusu.
I have seen this posting but this is not what I want.

My program is working in our environment. The program is called dynamically. But the same program does not seem to be initializing the working storage variables in the Customer's environment.

I like to know if there is any Compile parameters for this discrepency.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12382
Topics: 75
Location: San Jose

PostPosted: Thu Sep 07, 2006 9:02 am    Post subject: Reply with quote

pai_sunil_bs,

Make sure that the pgm is link-edited with NOREUS linkage-editor or binder option in the Customer environment which ensures a fresh copy of the program on a subsequent CALL. To verify this run an AMBLIST on the load module.

Check this link which explains in detail about AMBLIST

http://www.mvsforums.com/helpboards/viewtopic.php?t=3397&highlight=amblist

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
haatvedt
Beginner


Joined: 14 Nov 2003
Posts: 66
Topics: 0
Location: St Cloud, Minnesota USA

PostPosted: Sun Sep 10, 2006 12:44 pm    Post subject: Reply with quote

Pai_sunil_bs,

I would recommend that you change your program to make it serially reusable. From a performance perspective, requiring a subroutine to be reloaded each call would be unacceptable in most production environments.

Chuck H.
_________________
Chuck Haatvedt

email --> clastnameatcharterdotnet

(replace lastname, at, dot with appropriate
characters)
Back to top
View user's profile Send private message
pai_sunil_bs
Beginner


Joined: 19 Sep 2005
Posts: 21
Topics: 11

PostPosted: Mon Sep 11, 2006 1:51 pm    Post subject: Reply with quote

Thanks to All for the responses.
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