895 pts.
 Stored Procedure
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: September 3, 2009  4:40 PM

Answer Wiki:
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
Last Wiki Answer Submitted:  September 3, 2009  3:57 pm  by  philpl1jb   44,190 pts.
All Answer Wiki Contributors:  philpl1jb   44,190 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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 pts.

 

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 pts.