Page 1 of 1

Call a procedure from AS400 System in Stored Procedure Stag

Posted: Wed Apr 29, 2009 12:03 pm
by kris18
I am trying to call a procedure from SP Stage.
This procedure is on a AS400 System.
I am getting the following error when executing the Procedure.

"CopyOfSSC1000_J_BNK3EXT_INBOUND_013..Stored_Procedure_18: First output column must be a Procedure return code."



Below is the Procedure...

Create procedure SSCRET004

( out ErrCode numeric ( 4,0 ),
out ErrDesc char ( 60 )

)

language rpgle
not deterministic
modifies sql data
external name ReoGenNCF
parameter style sql

Code of REOGenNCF

dReoGenNCF Pr
d ErrCode 4s 0
d ErrDesc 60

* -Entry ------------------------------------------
dReoGenNCF Pi
d ErrCode 4s 0
d ErrDesc 60

* -Initial ------------------------------------------
/Free

ErrCode = *zeros ;
ErrDesc = 'Stored Procedure Completed Successfully';

Return;

/End-Free

This is just a test Procedure..
Any suggestions will be helpful...
Thanks,