View previous topic :: View next topic |
Author |
Message |
pai_sunil_bs Beginner
Joined: 19 Sep 2005 Posts: 21 Topics: 11
|
Posted: Wed Sep 06, 2006 8:32 pm Post subject: Initialization of Working storage variables |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
pai_sunil_bs Beginner
Joined: 19 Sep 2005 Posts: 21 Topics: 11
|
Posted: Wed Sep 06, 2006 10:00 pm Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
haatvedt Beginner
Joined: 14 Nov 2003 Posts: 66 Topics: 0 Location: St Cloud, Minnesota USA
|
Posted: Sun Sep 10, 2006 12:44 pm Post subject: |
|
|
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 |
|
 |
pai_sunil_bs Beginner
Joined: 19 Sep 2005 Posts: 21 Topics: 11
|
Posted: Mon Sep 11, 2006 1:51 pm Post subject: |
|
|
Thanks to All for the responses. |
|
Back to top |
|
 |
|
|