Extend the following class:
org.springframework.jdbc.object.StoredProcedure
http://www.springframework.org/docs/...toredProcedure
The constructor should take your datasource.
STORED_PROCEDURE_NAME should be the name of the stored procedure on the AS400.
Code:
super(ds, STORED_PROCEDURE_NAME);
Within the constructor, declare your inputs and outputs of the stored procedure.
Code:
declareParameter(new SqlParameter(WHATEVER, Types.VARCHAR));
declareParameter(new SqlOutParameter(NEXTPARAM, Types.VARCHAR));
Create the stored procedure object, and call the execute operation that you have overwritten. Follow the steps in the URL provided above.