View previous topic :: View next topic |
Author |
Message |
iamdilip Beginner
Joined: 06 Jun 2008 Posts: 1 Topics: 1 Location: india
|
Posted: Fri Jun 06, 2008 11:31 pm Post subject: DB2 query in a sub-program |
|
|
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 |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Sat Jun 07, 2008 4:47 am Post subject: |
|
|
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 |
|
 |
|
|