Page 1 of 1

How to call stored proc from a cobol module

PostPosted: Wed Feb 13, 2013 4:37 pm
by russel
Hi all
i want to call a stored procedure from a cobol module
i am using following way to achieve that but i am getting sql error -444 (user program could not be found)

EXEC SQL
CALL <SP_NAME> (:LS-INPUT,
:LS-OUTPUT)
END-EXEC

I have compiled the SP module as C37NSP31module

Re: How to call stored proc from a cobol module

PostPosted: Fri Mar 01, 2013 12:23 am
by pmartyn
It sounds like you forgot the CONNECT call
EXEC SQL
CONNECT TO dev (WHATEVER)
END EXEC

then perform your call. Remember do not check for SQLCODE = ZERO. Check for sqlcode +466 instead and comtinue processing.