View previous topic :: View next topic
|
Author |
Message |
new2cobol
New User
Joined: 04 Jan 2006 Posts: 77 Location: Bangalore
|
|
|
|
Hi,
I have a Cobol code which calls a number of sub-programs. I need the sub-programs' working storage to be resident, ie the values in the working storage should not change when I 'CALL' it again...
Can any one suggest some compiler / run time options to do the same?
I tried compiing it wit RENT,RMODE(ANY),DATA(31) Link-Edited with options RENT,XREF,LIST,MAP and still not working. |
|
Back to top |
|
|
NIRAJ BILGE
New User
Joined: 05 Aug 2006 Posts: 11
|
|
|
|
hi
i think u can create wss member in one group item
and each time pass them in sub-pgm using linkage section
for this u have to create the same group item in each sub-pgm.
i know its very cumbersome, if any other option then let me know. |
|
Back to top |
|
|
new2cobol
New User
Joined: 04 Jan 2006 Posts: 77 Location: Bangalore
|
|
|
|
Hi,
I don't want to use the Linkage section... I want the working storage be stored above the 16 MB line...
Is there an option for this? |
|
Back to top |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
hello new2cobol,
When you say the values should not change, are you talking about the values being the initialized values as the subroutine was called the first time, or reserving the values from the prior call?
The normal condition of subroutines run from batch programs is to preserve the values from the prior call. You must re-initialize the values on each call if you do not want the prior values.
Dave |
|
Back to top |
|
|
new2cobol
New User
Joined: 04 Jan 2006 Posts: 77 Location: Bangalore
|
|
|
|
Hey I got the solution...
Compile the programs with RENT,RMODE(ANY),DATA(31) & link-edit the programs with RENT,RMODE(ANY),REUS,MAP.
And make sure that the working storage variables do not have the VALUE clause.
Worked like a charm. |
|
Back to top |
|
|
|