Skip to main content

Problem:

RTS114 error returned on call to Oracle procedure from OpenESQL application

COBES0100S Incorrect SQL statement syntax near begin

Resolution:

When converting Pro*COBOL applications to execute using OpenESQL, note that the syntax for calling Oracle procedures may differ. Specifically :

o PL/SQL cannot be used with OpenESQL applications.

o Parameters should be followed by the parameter type, i.e. IN, INPUT, INOUT, OUT, OUTPUT. If no type is specified, INPUT is assumed.

Whereas under Pro*COBOL, you would code :

EXEC SQL EXECUTE

             BEGIN

                mySchema.myProc(

                   :param1,

                   :param2,

                   :param-returncode

                  );

             END;

END-EXEC.

using OpenESQL, you should instead code :

EXEC SQL

           CALL mySchema.myProc(

                   :param1,

                   :param2,

                   :param-returncode OUT )

END-EXEC.

Old KB# 7014