Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Is INITIALIZE costly as regards performance

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Is INITIALIZE costly as regards performance
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10374
Location: italy

PostPosted: Tue Feb 05, 2008 2:25 pm    Post subject: Reply to: Is INITIALIZE costly as regards performance
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: 6970
Location: porcelain throne

PostPosted: Tue Feb 05, 2008 2:30 pm    Post subject:
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    Post subject: Reply to: Is INITIALIZE costly as regards performance
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: 686
Location: Earth

PostPosted: Tue Feb 05, 2008 7:24 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10374
Location: italy

PostPosted: Tue Feb 05, 2008 7:31 pm    Post subject: Reply to: Is INITIALIZE costly as regards performance
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CONTIG for performance? JPVRoff JCL & VSAM 8 Fri Jun 09, 2017 8:39 am
No new posts BC, BCR, BRC, BRCL performance steve-myers PL/I & Assembler 0 Fri Dec 23, 2016 7:44 am
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What are the way we can improve CPU p... Gunapala CN DB2 10 Mon Oct 24, 2016 2:16 pm
No new posts DISP=(SHR,PASS) performance opinion steve-myers JCL & VSAM 1 Wed Dec 02, 2015 11:53 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us