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.
Mike On Tue, Feb 7, 2023 at 5:40 AM Binyamin Dissen <[email protected]> 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 <[email protected]> > http://www.dissensoftware.com > > Director, Dissen Software, Bar & Grill - Israel > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > -- Mike ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
