I am trying to return a count value from an SQL Stored Procedure in order to test if the record exists or not. I am calling the procedure from java as follows.
CREATE PROCEDURE RTVSQL
(IN LEVL CHARACTER(1),
IN SYLL CHARACTER(4),
INOUT FOUND INTEGER(2))
SELECT COUNT(*) INTO FOUND FROM EPYSTSTDTA/EPBSREP
WHERE BSAICD = LEVL AND BSAWCD = SYLL;