Executing a simple select on a DB2 Mainframe DB table. Displaying the following on the SQLException ( which I know is a not found - sqlcode = +100 ) ==> | e.getMessage = [jcc][t4][3.62.56] Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null | In Cobol , if we cared we would simply do IF +100 Do something. I'm sure it’s obvious but I just can’t find a simple answer on the internet. My background is mainframe so please forgive my stupidity. What do I have to ask SQLEXCFPTION to bring back the SQLCODE , so I can integrate it ?