MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DB2 query in a sub-program

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
iamdilip
Beginner


Joined: 06 Jun 2008
Posts: 1
Topics: 1
Location: india

PostPosted: Fri Jun 06, 2008 11:31 pm    Post subject: DB2 query in a sub-program Reply with quote

Hi,

I need to know the performance for the below two cases.

1. I will embed all my DB2 queries in a COBOL program.

2. I will write a cobol sub-program which will have a DB2 query. Whenever I need to query I will call this cobol sub-program from the main COBOL program.

The second option will provide me more modularity. But which is more efficient? What will be the effects on performance. Performance is a key factor in deciding the choice.

Pls provide your suggestions.

Thanks,
Dilip
Back to top
View user's profile Send private message Yahoo Messenger
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Sat Jun 07, 2008 4:47 am    Post subject: Reply with quote

Using sub-programs/subroutines is always less efficient simply because of he overhead needed to to the call and the return. I was on one project where performance was the number 1 priority and we removed all calls to subroutines unless there were multiple calls to a particular subroutine.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group