We are using an SQL schema to access network database (No SQL tables are involved). We created a stored procedure (NOT Table stored procedure) that calls a COBOL DC program. The COBOL program does network DML calls and returns the results back to the stored procedure. The stored procedure is called by a Java program running on JBOSS server using JDBC drivers. We have used the sample programs in the books to get us here. We will appreciate if someone can share the following with us:
1. Techniques used to pass errors back from the COBOL program to the Java client. Are there any system level variables that can be leveraged ?
2. A Sample Stored Procedure definition and the called COBOL program. Again, we have used what is in books but will appreciate if someone can share a little more sophisticated use of features and definitions.