You can use the following code snippet to create a callable statement to execute a database procedure and get results out in resultSet:
BindingContext bindingContext =
BindingContext.getCurrent();
ApplicationModuleImpl amimpl=
(ApplicationModuleImpl)(ApplicationModule)
bindingContext.getDefaultDataControl()
.getDataProvider();
DBTransaction trans=amimpl.getDBTransaction();
CallableStatement cs = trans.createCallableStatement("{call ? :=
CallableStatement cs = trans.createCallableStatement("{call ? :=
NAME_OF_PROCEDURE(?,?) }",trans.DEFAULT);
cs.registerOutParameter(1, Types.VARCHAR);
cs.setString(2, searchstring);
cs.setString(3, "");
cs.execute();
return cs.getString(1);