Write DB2 query in a sub-program or main program?
Posted: Fri Jan 02, 2015 3:24 pm
Hi,
I've a requirement in which I need to execute some DB2 queries. The proramming language will be COBOL. Now I think of two things:
1. I can write all my DB2 queries in a single COBOL program and get it all done. But the program will be very lenghty and complexto understand.
2. In other choice, I can write a cobol sub-program which will have DB2 queries and when I need to execute a query, I will call this cobol sub-program from the main COBOL program.
Now as the second option can provide me more modularity, I think but which is more efficient in these two? Performance is a number one priority in this project.
Please share your suggestions.
I've a requirement in which I need to execute some DB2 queries. The proramming language will be COBOL. Now I think of two things:
1. I can write all my DB2 queries in a single COBOL program and get it all done. But the program will be very lenghty and complexto understand.
2. In other choice, I can write a cobol sub-program which will have DB2 queries and when I need to execute a query, I will call this cobol sub-program from the main COBOL program.
Now as the second option can provide me more modularity, I think but which is more efficient in these two? Performance is a number one priority in this project.
Please share your suggestions.