Re: Stored Procedure calling RPGLE
- From: CRPence <crpence@xxxxxxxxxxxx>
- Date: Sun, 12 Aug 2007 09:35:44 -0500
A common problem using the given procedure definition, would be the use of CHAR versus VARCHAR. Unless the type is defined by a field or bound in a program, the VARCHAR must be used because the SQL will type the parameter as VARCHAR. If not, then SQL0204 would be the result. Review of the joblog for the failed call request would probably show an error message. If that does not resolve, some thoughts:
Specifically in each case, how was the procedure invoked. What is meant by 'send me a message'? A message sent to an external message queue would seem to be the best method to verify. What was the SQLcode for the SQL CALL? Was the CALL from RPG actually an SQL CALL from SQLRPG? If not, then probably best to work from there. The Run SQL Scripts where a request to CALL MYLIB.SP_WEBAUTH ('A', 'A', ?) is both functional and somewhat simplified as compared with embedded.
Regards, Chuck
--
All comments provided "as is" with no warranties of any kind whatsoever and may not represent positions, strategies, nor views of my employer
Matt wrote:
I am having a problem with a stored procedure that calls an RPGLE.
program. When calling the stored procedure from a PHP or an ODBC
connection, the RPG program never executes. When I calling it from
IBM iSeries Access or another RPG program, it executes fine. I know
this because I have the program send me a message with the job
information when it executes. I don't receive those messages when I
execute it via PHP or an ODBC connection.
Below is the code for the stored procedure. I assume the problem is
in this code or is related to how something is configured. Any help
(or tips) would be appreciated, because I am pretty much stuck.
DROP PROCEDURE MYLIB.SP_WEBAUTH;
CREATE PROCEDURE MYLIB.SP_WEBAUTH (IN var1 CHAR(15),
IN var2 CHAR(6),
OUT valid CHAR(1))
LANGUAGE RPGLE
PARAMETER STYLE GENERAL
DYNAMIC RESULT SETS 0
EXTERNAL NAME 'MYLIB/WEBAUTH'
- References:
- Stored Procedure calling RPGLE
- From: Matt
- Stored Procedure calling RPGLE
- Prev by Date: Re: DATE CALCULATIONS USING AS400 QUERY
- Next by Date: PRPQ
- Previous by thread: Re: Stored Procedure calling RPGLE
- Next by thread: opnqryf
- Index(es):
Relevant Pages
|