IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Is INITIALIZE costly as regards performance


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
tushar_study

New User


Joined: 01 Feb 2007
Posts: 30
Location: Mumbai

PostPosted: Tue Feb 05, 2008 11:06 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Feb 05, 2008 2:25 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Feb 05, 2008 2:30 pm
Reply with quote

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
View user's profile Send private message
Aji

New User


Joined: 03 Feb 2006
Posts: 53
Location: Mumbai

PostPosted: Tue Feb 05, 2008 7:12 pm
Reply with quote

Have you used the Cancel command.

Aji
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Tue Feb 05, 2008 7:24 pm
Reply with quote

Another way will be to use INITIAL attribute for your subprogram.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Feb 05, 2008 7:31 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts exploiting Z16 performance PL/I & Assembler 2
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
No new posts Which SORT utility can improve the Pe... DFSORT/ICETOOL 16
No new posts COBOL Performance Tuning COBOL Programming 6
No new posts CICS Performance statistics CICS 3
Search our Forums:

Back to Top