Use SQL CALL statement to run the stored procedure in AS400. On the CALL statement, specify the stored procedure name and any parameters if required. The parameters include constants, special registers, host variables, or expression and SQL variables. To run the stored procedure, try to call using the name specified on the CREATE PROCEDURE statement. For example, consider a simple SQL stored procedure as follows:
CREATE PROCEDURE SQLInsertProc(
IN P_FLD1 CHAR(20),
IN P_FLD2 CHAR(1) )
SPECIFIC SQLPROC1
BEGIN
INSERT INTO PF1(FLD1,FLD2) VALUES(P_FLD1,P_FLD2);
END
To run this stored procedure, use the SQL CALL statement as follows: CALL SQLInsertProc('TEST', '1')
Use
SQL CALL
statement to run the stored procedure in AS400. On the CALL statement, specify the stored procedure name and any parameters if required. The parameters include constants, special registers, host variables, or expression and SQL variables. To run the stored procedure, try to call using the name specified on the CREATE PROCEDURE statement. For example, consider a simple SQL stored procedure as follows:To run this stored procedure, use the
SQL CALL
statement as follows:CALL SQLInsertProc('TEST', '1')