On Tue, 7 Feb 2023 09:48:28 -0600 Mike Bell <mbell1...@gmail.com> wrote:

:>you forgot the bind step - when you created the stored procedure the JCL
:>should have had a ddname for DBRMLIB usually a pds with a member name the
:>same as your stored procedure. I don't have a sample bind handy but the
:>manual has several.

I did BIND the SP package and the EXECSQL CALL from REXX is working.

The -805 is occurring for the SQL statement (a SELECT INTO) in the SP.

:>On Tue, Feb 7, 2023 at 5:40 AM Binyamin Dissen <bdis...@dissensoftware.com>
:>wrote:
:>
:>> I have written a COBOL Stored Procedure and have successfully invoked it
:>> from
:>> REXX.

:>> But when I add an SQL statement to the SP, the SQL statement is getting
:>> -805.

:>> Is there a requirement to add the package(s) of external SPs to the PLAN of
:>> the invoking  program? Seems like an onerous requirement.

:>> Am I missing an obvious step?

:>> The CREATE PROCEDURE

:>> CREATE PROCEDURE SYSPROC.SP01 (
:>>            IN  EMPNO       CHAR(6)   CCSID EBCDIC,
:>>            OUT WORKDEPT    CHAR(3)   CCSID EBCDIC,
:>>            OUT INFORETURN  CHAR(100) CCSID EBCDIC)
:>>        LANGUAGE COBOL
:>>        READS SQL DATA
:>>        EXTERNAL NAME 'xxxxxxxx'
:>>        PARAMETER STYLE SQL
:>>        DBINFO
:>>        COMMIT ON RETURN NO
:>>        CALLED ON NULL INPUT

--
Binyamin Dissen <bdis...@dissensoftware.com>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to