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.
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