• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2156
  • Last Modified:

Converting COBOL Program to DB2 Stored Procedures

Hi,
We have many COBOL programs on IBM mainframe, we are planning to convert them to DB2 stored procedure. is there any tools to conver this. Is there any performance and easy mainitenance benifit?.
0
makkena_v
Asked:
makkena_v
  • 2
1 Solution
 
ClementeBiondoCommented:
no, there isn't any tool. Also in DB2 a stored procedure
is a trick, when you write one it is converted in C source and then compiled (take a look at /home/db2inst1/sqllib/function/routine/sqlproc to see the c source).
ByeBye.
0
 
ClementeBiondoCommented:
no, there isn't any tool. Also in DB2 a stored procedure
is a trick, when you write one it is converted in C source and then compiled (take a look at /home/db2inst1/sqllib/function/routine/sqlproc to see the c source).
ByeBye.
0
 
shalomcCTOCommented:
Hi makkena_v ,

Yes, there is a way to use your legacy system.
IBM UDB supports External Stored Procedures, which are SQL wrappers around existing programs.

http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/dsnsq0g3/CCONTENTS

look for the " CREATE PROCEDURE (external) " definition.

You will not see a performance penalty, and the benefits are obvious - you wrap your business logic and use it either internally or expose it thru the stored procedure to external applications via ODBC/JDBC.


Cheers,
ShalomC
0
 
fierroscCommented:
Makkena_v,

You can, with little effort, port your DB2/390 COBOL stored procedures to DB2 UDB stored procedures. DB2 UDB on the open systems has support COBOL as a stored procedure langauge since v1 came out in 1989.

You want to keep in mind which COBOL compilers IBM will support for the platform you are planning on using. For example on DB2 UDB for Windows IBM Visual Age Cobol and Micro Focus Workbench Cobol are "officially supported", but you can use CA Realia Cobol and for the best performance I recommned you take a look at Micro Focus's Net Express compiler. Note that these compilers aren't cheap, when you compare them to free Java, but it will be cheaper to port the existing code than re-write all of them and the performance will blow the doors of a Java stored procedure.

You will want to get started by reading the Applicatoin Building Guide and reading the chapter on the platform you plan to compiler on, for example Chapter 13. Building Applications for Windows includes sections on both IBM VisualAGe COBOL and Micro Focus COBOL.

Then take a look at the Application Development Guide and specifically Chapter 23. Programming in COBOL.

Then get to work by installing the DB2 UDB SDK and building the sample programs that you will find in \sqllib\samples\Cobol (IBM)and sqllib\samples\Cobol_MF( micro focus) after you install the DB2 UDB SDK.

Cheers...Chris
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now