View previous topic :: View next topic
|
Author |
Message |
tushar_study
New User
Joined: 01 Feb 2007 Posts: 30 Location: Mumbai
|
|
|
|
I have the following scenario.
I have a progam (Say A) .Input to A is a file which it reads ,builds a pass area and calls prog B for each record in the input file.Prog B further doea the processing of the data it receives via linkage from A.
When I Expedite A and go to B I see values of previous records(say i am on 2 nd record then i see values of 1st record on reaching Procedure Division of B).
My query is that the data receiving layouts in prog B are in working storage so for each call the layouts should get initialized automatically.
Still the values of previous record persist.
Can someone help me?.According to what i understand is that coz the program resides in the memory so the values of previous records are there.
I tried using INITIALIZE but was told that it is costly as regards performance.
Is there any other alternative.
Thanks in advance.
Regards,
Tushar |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
You mean that program B is getting the wrong values?
or simply that wandering thru storage You see old things left around ??
case 1... correct Your program(s)
case 2... nothing to worry about
( if You had the authority wander thru the memory of Your system You would see lots of older dat laying around ) |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
I tried using INITIALIZE but was told that it is costly as regards performance
|
as apposed to what? Sounds like half good advice. No one with any professionalism would say that without decent qualification. |
|
Back to top |
|
|
Aji
New User
Joined: 03 Feb 2006 Posts: 53 Location: Mumbai
|
|
|
|
Have you used the Cancel command.
Aji |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Another way will be to use INITIAL attribute for your subprogram. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
I would not suggest any solution until the O/P has answered my prevoius questions
if the programs have been properly written
the subprograms has NO need to initialize the area where parameters are being passed...
it' s a caller responsibility to provide proper data to the called program |
|
Back to top |
|
|
|