Stored procedure error in RPGLE program

895 pts.
Tags:
AS/400
AS/400 Library
RPGLE
I've to use stored procedure in RPGLE program. My code is CallP     OESP_PORD_001(IPAT#:OPNXT#:PRJUK) I get error name or indicator not defined...I checked the library, parameters and everything are in place....Am I calling the SP with the right syntax? I tried to then change this whole using SQL...execute statement however my program is RPGLE and not SQLRPGLE... Please help -NG

Software/Hardware used:
as400
ASKED: September 3, 2009  3:08 PM
UPDATED: June 27, 2013  6:55 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

CALLP is call with prototype not call stored procedure.

I think you will have to change the program to SQLRPGLE and execute the procedure in SQL.
or
If the stored procedure is really calling an rpg/cl program then you can skip the stored procedure,
call the rpg/cl program with CALLP and create a prototype.
Phil

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Nutangujar
    yes i defined it 2nd way and now it works....thanks... well i'm trying to understand this whole naming convention .... the stored procedure has name OESP_PORD_001, when this is stored in the DB library after compilation(?) it receives the object name OESP_00001...... when i define the prototype i have to use this object name as the parameter. D UOPDD Pr Extname(OESP_00001) .... C Callp UOPDD(Parm1:Parm2:Parm3) now the program compiles but this throws error - More parameters were passed in the prototyped call than are allowed. when i checked the SP, it has 3 input parameters.........then where it is going wrong.... --NG
    895 pointsBadges:
    report
  • Nutangujar
    Well ....i guess i found the reason....i need to declare the Parm data types in the pr prototype.... is there any good reference to learn SP...
    895 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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following