The lack of answers is probably enough of an answer: There is no
straightforward way to accomplish this.
There is, however, a sneaky indirect way to do it, if you are willing to
accept some risks.
1. Create a "loopback" entry in sysservers that points back to this
same ASE.
2. Encapsulate the "set lock wait" and the DML into a stored procedure.
3. Execute "loopback.<datbase>.<owner>.<wait-update-proc>"
Now, if the wait expires, the stored procedure's transaction will be
rolled back, but it will only contain the single update. To ASE, this
looks like a remote connection to/from another ASE, so the transaction
is separate from your calling transaction.
Disadvantage: If you need to roll back your entire transaction later,
you will need to add code that is smart enough to undo the remote
transaction; and, if the rollback happens because of another error, you
may not have enough control to do this. You could end up with a design
that includes some kind of pseudo-transaction-log table. Icky.
-Tommy Phillips