RATE THIS ANSWER
+1
Click to Vote:
1
0
CREATE PROCEDURE ABCSP(
IN PARM1 CHAR(1),
IN PARM2 NUMERIC(9,0),
IN PARM3 NUMERIC(9,0))
LANGUAGE RPGLE RESULT SET 1
NOT DETERMINISTIC
MODIFIES SQL DATA
EXTERNAL NAME ABCRPG( program name )
PARAMETER STYLE GENERAL
Type of Sp as like SQLSPE
Create and compile your CL on the AS400 as normal. Then from a command line type STRSQL and enter the following code.
CREATE PROCEDURE library/clpgm (IN parm1 DEC(3), IN parm2 CHAR(10))
RESULT SETS 1
EXTERNAL NAME library/clpgm
LANGUAGE CL NOT DETERMINISTIC NO SQL
PARAMETER STYLE GENERAL
You should receive a message back:
Procedure clpgm was created in library
You can have as many IN and OUT parms as you need, the must be exactly defined. Also as long as you don't change your parms you can change the CL on the AS400 and recompile without recreating the procedure. If you need to recreate the procedure it is:
DROP PROCEDURE library/clpgm
Then you can Create it again. I have had problems with using the DEC parms so I always convert them to CHAR in the CL before using.
Last Answered:
Aug 26 2009 1:14 PM GMT by Ysantosh 
30 pts.