Because debugging a stored procedure by its very nature implies stopping the server and stepping through the server code, it is imperative that the programmer debugging the stored procedure code is the only person using the database server. You should therefore debug DB2 LUW stored procedures using a database on your own workstation if possible.
You can test a COBOL stored procedure without coding a client program by using:
- The IBM Stored Procedure Builder to run a stored procedure. You connect to the database where the stored procedure is located, and then select the stored procedure you want to run. The Store Procedure Builder then prompts you for INPUT and INOUT values. The results and any errors are then displayed. 
- The DB2 command prompt.
If you don't get the expected results, you might want to debug the COBOL stored procedure. The following is required to successfully debug a stored procedure:
- Before compiling your stored procedure, add a call to CBL_DEBUGBREAK at the place where you want to start debugging
- Link the COBOL stored procedure to load the dynamic COBOL runtime
- When the CBL_DEBUGBREAK message box appears, click Yes
Tip: 
 If the stored procedure is not working as expected, make sure the parameters passed to the stored procedure are getting passed in the expected format by examining each parameter in the Linkage Section.