Call a procedure from AS400 System in Stored Procedure Stag

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
kris18
Charter Member
Charter Member
Posts: 46
Joined: Mon Nov 13, 2006 9:53 am
Location: United States

Call a procedure from AS400 System in Stored Procedure Stag

Post 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,
kris
Post Reply