473,737 Members | 8,958 Online
Bytes | Software Development & Data Engineering Community
+ 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 1547
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.


"Gary" <gu*****@gmail. comwrote in message
news:11******** **************@ m79g2000cwm.goo glegroups.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

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 store the stored procedures in different files I think)
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 graphics object of the form/pictureBox. Should It be better if make a graphics object from my pictureBox in load event handler of the form and store it as member variable of the form , make
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 table the expected result value(s) are entered when executed against a sample database containing manually entered and verified data. My current problem is that the stored procedures' input
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 that is not allowed. The Main SP say A ,calls SP1 reads the data and in a while loop calls the SP2 to insert the data in that is retrieved in the
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 major software release. All of our Java stored procedures have developed some bad behavior and we've exhausted our resources in figuring this out. Symptoms: 1. Store procedures have stopped returning result sets. Whereas before, it would...
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 drop non-visual (controls) on the data module surface and wire them up and create procedures, functions, event procedures. In the source file (code behind file) the Data Module is a class, and the dropped components are public properties. The...
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 Truncated. so we need a solution to store and retrieve user Entered value along with single quotes into the Database. i am using the String variable to frame the Qry(that is then passed to Database for execution) which is as follows
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
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 procedures for add, edit etc data in database. sql server 2000 i m using for databse. kindly help me out as soon.
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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 we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.