473,480 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

db2 store procedures Question

if I have 1000 cobol insructions running in batch, and I have 1000
cobol instructions running in a store procedure, which one will be more
efficient (execute faster) or there is no difference. and in this
questions no db2 sql, simply cobol instructions!!!!

Aug 18 '06 #1
2 1531
Generally, running SQL inside a stored procedure is the fastest way to
process instructions - as the SQL is running inside the database engine
- there is nothing going over wire/tcpip.
Even if you have compiled (external) COBOL Stored Procedures - although
external, they are running right beside the database engine - so will
be faster then an alternative running SQL over wire.
Gary wrote:
if I have 1000 cobol insructions running in batch, and I have 1000
cobol instructions running in a store procedure, which one will be more
efficient (execute faster) or there is no difference. and in this
questions no db2 sql, simply cobol instructions!!!!
Aug 20 '06 #2
The COBOL would run at the same speed, the difference would be in the
overhead of getting to the code. In batch, everytime you execute it, all it
does is a simple branch & link - calling the same code as a stored procedure
would have all the overhead of passing through db2, then getting the results
back etc.

- I had a series of programs that I coded as DB2 functions - which were
called hundreds of thousands of times and they ran real slow. Converting the
application to COBOL batch file processing calling COBOL suboutines made the
whole process run much much faster...

- It really depends on how often you want to call it, and where else you may
want to call it from in the future. As a stored procedure, you can call it
from a java web app - something you can't do with a COBOL subroutine. But
then again if you're only passing back output parameters - the same code
could be called as either a subroutine or a stored procedure.

Bill

"Gary" <gu*****@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
if I have 1000 cobol insructions running in batch, and I have 1000
cobol instructions running in a store procedure, which one will be more
efficient (execute faster) or there is no difference. and in this
questions no db2 sql, simply cobol instructions!!!!

Sep 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
7773
by: A.M. de Jong | last post by:
How does MicroSoft store the stored procedures in seperate files. What tools are used. Cause that's what I like to do too. Arno de Jong, The Netherlands. (SCPTFXR does not have the option to...
12
2333
by: Sanjay | last post by:
hi, We are currently porting our project from VB6 to VB .NET. Earlier we used to make scale transformations on objects like pictureBox , forms etc.Now Such transformations are made on the...
2
4219
by: serge | last post by:
My project is to automate testing of Stored Procedures of type SELECT (at least for now). I want to create a table where each stored procedure's input parameter values are entered and in another...
7
2837
by: George | last post by:
Hi , I am getting the below error while i am invoking a Java stored procedure from another java stored procedure. SQL0751N Routine "" (specific name "") attempted to execute a statement...
1
1554
by: esmith2112 | last post by:
We all of a sudden find ourselves in dire straits, because we have one of those mysteries where everything used to work, and apparently, all of a sudden everything went to pot just in time for a...
5
1943
by: jqpdev | last post by:
Hello all... I'm coming from a Borland Delphi background. Delphi has a specific component called a Data Module. In the designer the Data Module behaves like a windows form. A developer can...
3
2841
by: Solution Seeker | last post by:
I want to Store the String value with Single Quotes in the Field of Database where if i try to Store the String value with Single Quotes (as it is) then it is throwing the error as SQL String...
2
1343
by: Marc | last post by:
Hi: Does anyone know if IBM (or any other IT Software company) offers store procedure classes anywhere in the country? Thanks Marc
4
1516
by: seep | last post by:
hi.. i m working with vb.net 1st time. i wants to work with stored procedures. i have created stored procedures successfully but have no idea about how to code in vb.net to use these store...
0
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7045
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7087
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6741
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5341
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4782
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4483
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2985
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.