tracking execution
Posted in 1992
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Transactions, Locking & Isolation
A company I have been working is having a problem with deadlocks. We handled this by checking the status variable after executing any critical transactions. If there is a deadlock status returned we call a routine to handle this, which does a rollback. This works fine except we would like to know what statement caused it and where in the code it is. So basically what we would like to know is if there any globals variables or something to return the same information you get when there is an actual error, ie. the module and line number. I know we could hardcode them into all the calls but there alot of them and they would also have to be changed whenever we change code. We are currently running OnLine 4.0, I4GL 4.0 on Intergraph equipment. Our current call looks like the following : SOME CRITICAL DATABASE TRANSACTION IF status < 0 THEN CALL handle_warning(status) END IF handle_warning then insert the status into a table and send E-mail to the programming group that a deadlock happened and restarts the program for the user. Any help on how to determine where the program is executing would be appreciated. Bill Connors