Calling Store Procedure failing from ISeries

Tags:
iSeries
RPGLE
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:
SQL0469
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.
Any help as to why this is failing?
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • TheRealRaven
    Not much help unless you show us the stored proc definition along with the prototype for the program. Without those, we can only say the same things that the message says. It might also be necessary to see the CALL statement that you used.

    What is your OS version and DB2 group PTF level?

    To test, you should use 'iNavigator's 'Run SQL Scripts...' option rather than STRSQL. Though there might be a recent update that I haven't heard of, STRSQL will return the error that you described if an OUT parameter is part of it. STRSQL has no way to know anything about a returned value's properties (because it wasn't programmed for it).
    36,035 pointsBadges:
    report
  • ToddN2000
    Post the code you are using to create the stored procedure..
    Are you defining your parameters using the IN:, INOUT:?
    134,720 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: