473,888 Members | 1,437 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DB2 COBOL stored procedure to UDB SQL stored procedure

I have been given the task of taking a 3,200 line COBOL stored
procedure and duplicating the same functionality in UDB 7.2 on the
Windows platform with a procedural SQL stored procedure. I have
fiddled with procedural SQL stored procs on UDB, but mostly
short,trivial ones. Looking for good advice, links, etc. on the best
approach to this. There doesn't seem to be the concept of subroutines
within a stored proc, so I am guessing one main stored proc that may
be calling multiple smaller stored procs? Just found out about this
need late this afternoon and wondering what the best approach is to
doing such a task.

Any and all ideas most welcome.

thanks,

fv

Apr 5 '07 #1
4 3148
<PJ******@txf b-ins.comwrote in message
news:11******** **************@ y80g2000hsf.goo glegroups.com.. .
>I have been given the task of taking a 3,200 line COBOL stored
procedure and duplicating the same functionality in UDB 7.2 on the
Windows platform with a procedural SQL stored procedure. I have
fiddled with procedural SQL stored procs on UDB, but mostly
short,trivial ones. Looking for good advice, links, etc. on the best
approach to this. There doesn't seem to be the concept of subroutines
within a stored proc, so I am guessing one main stored proc that may
be calling multiple smaller stored procs? Just found out about this
need late this afternoon and wondering what the best approach is to
doing such a task.

Any and all ideas most welcome.

thanks,

fv
DB2 V7.2 for LUW is no longer supported for IBM (and has not been supported
for several years). On top of that, DB2 V8 LUW has implemented some
enhancements that make it easier to write stored procedures in SQL (as
opposed to C, Java, etc). Or better yet is DB2 V9 for LUW.
Apr 5 '07 #2
I have no control over what version of UDB we are on - what we have
is what I have to deal with and can only dream of V8 or V9. Just a
lowly developer given the task and need some advice as to the best
approach to the problem using procedural SQL. After looking at the
cobol stored proc for about 30 minutes I have a vague idea of what it
is doing.

Any thoughts and advice about doing this in UDB 7.2 much appreciated.

fv
On Apr 4, 10:26 pm, "Mark A" <nob...@nowhere .comwrote:
<PJack...@txf b-ins.comwrote in message

news:11******** **************@ y80g2000hsf.goo glegroups.com.. .
I have been given the task of taking a 3,200 line COBOL stored
procedure and duplicating the same functionality in UDB 7.2 on the
Windows platform with a procedural SQL stored procedure. I have
fiddled with procedural SQL stored procs on UDB, but mostly
short,trivial ones. Looking for good advice, links, etc. on the best
approach to this. There doesn't seem to be the concept of subroutines
within a stored proc, so I am guessing one main stored proc that may
be calling multiple smaller stored procs? Just found out about this
need late this afternoon and wondering what the best approach is to
doing such a task.
Any and all ideas most welcome.
thanks,
fv

DB2 V7.2 for LUW is no longer supported for IBM (and has not been supported
for several years). On top of that, DB2 V8 LUW has implemented some
enhancements that make it easier to write stored procedures in SQL (as
opposed to C, Java, etc). Or better yet is DB2 V9 for LUW.

Apr 5 '07 #3
On Apr 5, 5:24 am, PJack...@txfb-ins.com wrote:
I have no control over what version of UDB we are on - what we have
is what I have to deal with and can only dream of V8 or V9. Just a
lowly developer given the task and need some advice as to the best
approach to the problem using procedural SQL. After looking at the
cobol stored proc for about 30 minutes I have a vague idea of what it
is doing.

Any thoughts and advice about doing this in UDB 7.2 much appreciated.

fv

On Apr 4, 10:26 pm, "Mark A" <nob...@nowhere .comwrote:
<PJack...@txf b-ins.comwrote in message
news:11******** **************@ y80g2000hsf.goo glegroups.com.. .
>I have been given the task of taking a 3,200 line COBOL stored
procedure and duplicating the same functionality in UDB 7.2 on the
Windows platform with a procedural SQL stored procedure. I have
fiddled with procedural SQL stored procs on UDB, but mostly
short,trivial ones. Looking for good advice, links, etc. on the best
approach to this. There doesn't seem to be the concept of subroutines
within a stored proc, so I am guessing one main stored proc that may
be calling multiple smaller stored procs? Just found out about this
need late this afternoon and wondering what the best approach is to
doing such a task.
Any and all ideas most welcome.
thanks,
fv
DB2 V7.2 for LUW is no longer supported for IBM (and has not been supported
for several years). On top of that, DB2 V8 LUW has implemented some
enhancements that make it easier to write stored procedures in SQL (as
opposed to C, Java, etc). Or better yet is DB2 V9 for LUW.

"Just a lowly developer", you say, hmm..

With your target of DB2 v7.2 on Windows, you probably read that
on *that* version the SQL-PL source-code for a stored procedure
gets converted to 'C' and then you need a supported 'C' compiler
to convert that to an executable form.

I suggest you carefully read relevant sections of two books "DB2 V7.2
Application Development Guide", and "DB2 V7.2 Application Building
Guide", which came with the documentation of DB2 Version 7.

Realise that the restriction of using the out of date Version 7.2 will
hamper your ability to get support, even from this group. So it may be
worthwhile making the case of using a supported version - which does
not need any separate 'C' compiler to run SQL PL stored procedures.

Apr 5 '07 #4

I stand corrected - we are on DB2 UDB version 8.1 in production. They
are looking at going to 8.2, but who knows when that might be. The C
compiler is already in place and has been for several years, and I
will be using the DB2 Development Center to write and build the stored
procedures.

thanks,

fv

>
"Just a lowly developer", you say, hmm..

With your target of DB2 v7.2 on Windows, you probably read that
on *that* version the SQL-PL source-code for a stored procedure
gets converted to 'C' and then you need a supported 'C' compiler
to convert that to an executable form.

I suggest you carefully read relevant sections of two books "DB2 V7.2
Application Development Guide", and "DB2 V7.2 Application Building
Guide", which came with the documentation of DB2 Version 7.

Realise that the restriction of using the out of date Version 7.2 will
hamper your ability to get support, even from this group. So it may be
worthwhile making the case of using a supported version - which does
not need any separate 'C' compiler to run SQL PL stored procedures.- Hide quoted text -

- Show quoted text -

Apr 5 '07 #5

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

Similar topics

2
5015
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.
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
1
5725
by: JLE | last post by:
I'm new to stored procedures, however, the passing of parameters using a group item in the calling cobol program seems incorrect to me. Would this work? Calling COBOL pgm is calling a stored procedure using a group 01 level and the receiving COBOL procedure has 01 levels for each parameter. Environment is z/OS, DB2, CICS, COBOL, LE. The procedure is local using WLM. DB2 version is 7.x and CICS is TS 2.2, I think.
0
2363
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
3500
by: bog39 | last post by:
We have z/os and DB/2 V. 8 running. I try to create a new UDF using the command CREATE FUNCTION: CREATE FUNCTION CNGETADR (INTEGER) RETURNS CHAR(50) EXTERNAL NAME CNADR001 PARAMETER STYLE DB2SQL WLM ENVIRONMENT WLMENV LANGUAGE COBOL DETERMINISTIC NO SQL NO DBINFO
0
2537
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
5807
by: pompeyoc | last post by:
I am trying to learn how to use stored procedures written in COBOL so I wrote 2 small programs to test it out: the stored procedure and the the calling program. I have no problems compiling them but when the calling program enters the SP, it either hangs or gives me sqlcode -1131. We are on AIX 5.2 (I think) running DB2 UDB ver 7.2 and MF COBOL 4.1. Below are the programs I wrote:
2
6430
by: pompeyoc | last post by:
Hi, I am a newbie when it comes to stored procs and i would like to learn how to call a COBOL program from a stored procedure. The SP can either be an DB2 SQL SP or an external COBOL/DB2 SP. I can use either depending on which is more efficient. One of the older posts ("Calling a COBOL Subroutine from COBOL/DB2 Stored Procedure" Dec 2005) suggested this is possible but I couldn't follow the explanation and there wasn't any examples....
1
2896
by: rsreeni | last post by:
Hi, We are planning to use Cobol Stored procedures for doing our Data retrieval from DB2 Tables. The stored procedure(s) will be called from J2EE application via Db2 Connect. Does the linkage restriction of 32K apply to the parameters getting passed into COBOL DB2 Stored procedures also? Thanks, -Sreeni
0
9961
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9800
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
11181
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...
0
10778
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10886
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
10439
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
9597
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6014
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4642
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 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.