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

Home Posts Topics Members FAQ

Calling a COBOL Subroutine from COBOL/DB2 Stored Procedure

Hi,

Has anyone called a COBOL subroutine using COBOL CALL from a COBOL/DB2
stored procedure? What are the complexities associated and what system
setting might be required?

Is this approach strategically better compared to converting the COBOL
subroutine into a stored procedure and then using a SQL CALL? This
COBOL subroutine is currently called by other COBOL and CICS programs
and will continue to be used there as well. If we covert it to a stored
procedure, other COBOL and CICS programs will also need to be changed.
But that effort is not a problem if converting this complex COBOL
subroutine into stored procedure is strategically beneficial in terms
of performance, debugging, future enhancements etc.

We have several such complex subroutines which are currently called
from COBOL and CICS programs. Now, there is a need for these
subroutines to be used real-time via web. We are planning to create new
stored procedures that will be called from web and these stored
procedures will in tern call the COBOL subroutines. We need to
strategically decide which way to go.

Thanks.

Nov 30 '05 #1
3 13477
S > Has anyone called a COBOL subroutine using COBOL CALL from a COBOL/DB2
S > stored procedure? What are the complexities associated and what system
S > setting might be required?
The easy answer is that it depends.

We use this all the time. Standard sub-program call in COBOL. Just make
sure you use the same interface in both COBOL links. DSNRLI for WLM and
DSNALI or DSNRLI for SPAS.

It is actually less resource expensive to call a COBOL module than
another SP. We have stub SPs calling modules which are called by batch
programs which run on the same LPAR so we have a single source module when we
need to expose the function to off-LPAR processes. Remember why Sybase
succeeded with Stored Procedures in the first place, reduced processing
time by reducing the network trips.

Edward Lipson via Relaynet.org Moondog
ed***********@moondog.com el*****@bankofny.com
---
þ MM 1.1 #0361 þ
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Dec 1 '05 #2
Thanks for the response.

When I tried this, I am getting SQLCODE -927 from the 1st SQL statement
that gets executed from the called subroutine. Please note that my
called subroutine is a normal cobol program and not defined as a stored
procedure.

Dec 1 '05 #3
S > Thanks for the response.

S > When I tried this, I am getting SQLCODE -927 from the 1st SQL statement
S > that gets executed from the called subroutine. Please note that my
S > called subroutine is a normal cobol program and not defined as a stored
S > procedure.
Check the manual
http://publib.boulder.ibm.com/infoce...v2r2/index.jsp

You got the linked interface modules mixed up. They have to match. The
SP you call determines which interface any DB2 subprogram you call MUST
use. Not Bath, Not IMS, not TSO, not CICS. The SP.
Edward Lipson via Relaynet.org Moondog
ed***********@moondog.com el*****@bankofny.com
---
þ MM 1.1 #0361 þ

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Dec 2 '05 #4

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

Similar topics

2
4028
by: Giulio Belrango | last post by:
Hi I need someones help I'm working in an IBM 390 batch environment. What I'm trying to do is to call from a non DB2 COBOL program a DB2 COBOL program that will access a table and perform an...
2
4972
by: Thomasb | last post by:
Hi! In our company we have a huge amount of COBOL sub-routines that are called from other COBOL-programs. Now we are looking for a method to call them from Windows/Web applications. One...
30
2238
by: Tim Marshall | last post by:
Here's the scenario, A2003, Jet back end, illustrated with some cut down code at the end of the post: A proc dims a snapshot recordset (dim rst as Dao.recordset) and opens it. There are several...
4
1876
by: Kalpesh Parikh | last post by:
We have 'C' routine calls Pro COBOL routine...... Data passed back to the C program is shifted by 4 bytes. We are trying to understand and fix this. p.s. COBOL to COBOL is working fine! Any...
2
1434
by: singlal | last post by:
Hi, my question was not getting any attention because it moved to 2nd page; so posting it again. Sorry for any inconvenience but I need to get it resolved fast. Need your help! ...
0
2344
by: Springflower | last post by:
Hi, I am new to using DB2 Development Center. I had downloaded the trial version(8.2) of latest DB2 UDB and want to write a stored procedure in COBOL. When I chose the oprion the wrting a new...
0
2497
by: gtan | last post by:
How can I call a stored procedure when one of the parameters is a cursor? Shouldn't the COBOL code looks something like this? : EXEC SQL CALL CMQRACIN(<what do i place here?>...
0
2029
by: balaji krishna | last post by:
Hi, I need to handle the return set from COBOL stored procedure from my invoking Java program. I do not know, how many rows the stored proc SQL fetches.I have declared the cursor in that proc, but i...
0
1100
by: MicheleW | last post by:
Can some tell me how to call a db2 cobol stored procedure in visual studio.net 2005? Thank you.
0
2039
by: tgmgokul84 | last post by:
Hi, I just want to call a cobol sub program in my stored procedure. While i try to call the sub program i am getting the SQL code -927. The Cobol sub program is called by many other cobol...
0
7048
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6911
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
7050
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
7091
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
6743
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
5344
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
4787
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
1303
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 ...
0
185
bsmnconsultancy
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...

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.