All on an iSeries.
I have written a RPGLE program that requires 7 parameters, The 6th is output the other 6 are input. I then create a Store procedure from this RPGLE program. Then using STRSQL I run a call to this store procedure, but I get the error:
Message . . . . : IN, OUT, or INOUT not valid for parameter 6 in procedure
StoreProcName in Library.
Cause . . . . . : The IN, INOUT, or OUT attribute specified for parameter 6
when the procedure was defined is not valid. The parameter name is
RENTINOUT. One of the following errors occurred:
-- The attribute is not consistent with the parameter on the CALL
statement. If the parameter was declared INOUT or OUT, the parameter on the
CALL statement must be specified as a host variable or a global variable.
-- The attribute was specified as INOUT or OUT and REXX was specified as
the language. The attribute must be IN if REXX is specified.
Recovery . . . : Either change the attribute of the parameter on the
DECLARE PROCEDURE, CREATE PROCEDURE, or ALTER PROCEDURE statement or change
the parameter. Try the request again.
When I created the store procedure I selected for the usage INOUT for the 6th parameter.
The 6th parameter is defined as decimal 5,2 both in the RPGLE and the store procedure.