473,569 Members | 2,813 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 3125
<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
4983
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...
1
5705
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...
0
2350
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
3469
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 ...
0
2513
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
5793
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...
2
6367
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...
1
2881
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
7926
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. ...
0
8138
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...
0
6287
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...
1
5514
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3657
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...
0
3647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2117
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
1
1228
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
946
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...

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.