Skip to content
Advertisement

Finding the actual Job number for a particular JDBC SQL connection to iSeries?

I am using the JTOpen JDBC driver to connect to the iSeries (aka AS/400, IBM System-i, IBMi, WTH?!…). I am having problems with a particular statement and it appears I need to go back to the actual SQL job QSQSRVR (or QZDASOINIT?) to find more details. Only problem is that there are hundreds of these on the system. Is there an easy way to determine the job which is actually handling my SQL connection or a particular statement?

Advertisement

Answer

From the JT400 javadoc of the class AS400JDBCConnectionHandle :

getServerJobIdentifier

public String getServerJobIdentifier() throws SQLException

connection. Every JDBC connection is associated with a host server job on the system. The format is:

interface, you typically need to cast a Connection object returned from PooledConnection.getConnection() to an AS400JDBCConnectionHandle in order to call this method:

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement