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!!!!