in db2 we have import ibm_db import active to check whether the cursor(dbh) is active or not I am looking for the similar module in sybase