?
Solved

Converting COBOL Program  to DB2 Stored Procedures

Posted on 2003-03-24
4
Medium Priority
?
2,089 Views
Last Modified: 2011-09-20
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
Comment
Question by:makkena_v
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Expert Comment

by:ClementeBiondo
ID: 8202873
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
 
LVL 1

Expert Comment

by:ClementeBiondo
ID: 8202960
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
 
LVL 33

Expert Comment

by:shalomc
ID: 8208854
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
 

Accepted Solution

by:
fierrosc earned 1000 total points
ID: 8215123
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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month8 days, 20 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question