This discussion is archived
1 Reply Latest reply: Sep 16, 2010 12:16 AM by jonjac RSS

Converting DB2 stored procedure to Oracle?

798122 Newbie
Currently Being Moderated
I need a little help with a problem I ran across this week. I have an existing DB2 Stored procedure that calls a COBOL program. (See the procedure below). Now, I need to convert this DB2 to an Oracle Stored Procedure. I need the procedure to call the same COBOL program that this DB2 procedure does. Is it possible in Oracle? Do I need to write a Java wrapper class instead? Please help!!

CREATE PROCEDURE CO_CASEINFORMATION (
IN PARM1 CHAR(006) FOR SBCS DATA CCSID EBCDIC ,
IN PARM2 CHAR(018) FOR SBCS DATA CCSID EBCDIC ,
IN PARM3 CHAR(004) FOR SBCS DATA CCSID EBCDIC ,
IN PARM4 CHAR(008) FOR SBCS DATA CCSID EBCDIC ,
IN PARM5 CHAR(026) FOR SBCS DATA CCSID EBCDIC
)
LANGUAGE COBOL
EXTERNAL NAME COSP183
COLLID CACSDEV9
PARAMETER STYLE GENERAL
NOT DETERMINISTIC
MODIFIES SQL DATA
WLM ENVIRONMENT CACSDEV9
STAY RESIDENT YES
RESULT SETS 01
;
  • 1. Re: Converting DB2 stored procedure to Oracle?
    jonjac Explorer
    Currently Being Moderated
    Although I've never done that with COBOL, the documentation says it is possible to call an external COBOL procedure from within Oracle, without a Java wrapper class.

    The way to do it is to rebuild your COBOL program with the Pro*COBOL pre-compiler.

    Read the Pro*COBOL Programmer's Guide for more details.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points