× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks everyone for your suggestions.
I created another stored procedure with 5 Input parameters, inside this
stored procedure I call the stored procedure that has the output parameter.

Example code, it might help someone else.

CREATE OR REPLACE PROCEDURE PROCEDURE1
(IN IN_P CHAR(8), IN IN_P2 CHAR(7), IN IN_P3 CHAR(4),
IN IN_P4 NUM(4,0), IN IN_P5 NUM(3,1))
LANGUAGE SQL
DYNAMIC RESULT SETS 1
BEGIN
DECLARE V_DYNAMIC VARCHAR(512);
DECLARE V_SQL VARCHAR(512);
DECLARE INOUT_P CHAR(18);
DECLARE CSR_C1 CURSOR WITH RETURN
FOR V_DYNAMIC;
SET INOUT_P = ' ';
CALL LIBRARY/STOREDPROC(IN_P, IN_P2 , IN_P3, IN_P4 ,IN_P5, INOUT_P);
SET V_SQL =
'SELECT ''' || INOUT_P || ''' FROM SYSIBM/SYSDUMMY1';
PREPARE V_DYNAMIC FROM V_SQL;
OPEN CSR_C1;
END;

This returns a result set.


On Fri, Dec 11, 2015 at 10:29 AM, CRPence <crpbottle@xxxxxxxxx> wrote:

On 11-Dec-2015 07:19 -0600, Mike Pavlak wrote:

If you review the ODBC extension at PHP.net you will see there is no
support for out or in/out parameters.

[http://php.net/manual/en/function.odbc-prepare.php]
"If you need to call a stored procedure using INOUT or OUT
parameters, the recommended workaround is to use a native extension
for your database ..."
<<SNIP>>


FWiW: Presumably another option is [to modify the procedure or to create
and use an alternate procedure] to return the InOut or Out data in a Result
Set, and then retrieve that result-set to obtain what data is not available
from parameter(s).

--
Regards, Chuck


--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.