473,701 Members | 2,361 Online
Bytes | Software Development & Data Engineering Community
+ 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 13531
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***********@m oondog.com el*****@bankofn y.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***********@m oondog.com el*****@bankofn y.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
4047
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 edit. I have several programs to add this to and I thought of adding a common subroutine versus adding duplicate code would be easier to maintain. The problem is from the calling COBOL program to the calle COBOL program I get a -924 (which is no DB2...
2
4999
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 idea is to wrap the sub-routine call in a DB2 stored procedure and call the procedure from our Web application.
30
2277
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 nested do loops, going through the records in rst using .movenext. At one point in one of the loops, we'll say the rst is at record "a". Now, another subprocedure is called, passing rst to it. In the subprocedure, the recordset goes through a...
4
1885
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 pointers you all can provide would be appreciated. Thank You.
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! **************************************************************************************************** Original Question: -------------------- Has anyone called a COBOL subroutine using COBOL CALL from a COBOL/DB2
0
2356
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 stored procedure, it had given me the following two language options:
0
2528
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?> :S-FINANCE-IN-DATA.ACCT-ID); END-EXEC By the way, the stored procedure looks like this:
0
2055
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 don't know how to return the rows the cursor has opened and I don't know how to handle the return set from the proc in my java code. My main problem with that proc is that whether I can retun the result set from the proc without closing the cursor...
0
1115
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
2067
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 program. Please help me in this regards.
0
8649
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,...
0
9221
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, 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...
1
8975
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,...
0
8933
tracyyun
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...
0
5904
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4410
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...
0
4661
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3102
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
3
2035
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 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.