SHARED HOLD and timeout ?

I am wondering if somebody from SAG can chime in and answer this for me :

what would happen if I do a READ/FIND with shared hold mode S without actually being in a transaction ? Natural does allow it (already tried), but when is the record released again for others to update ? Since I am not in a transaction, no ET or BT is issued so that cannot be the ‘trigger’ to release it.


If have one instruction of READ/FIND without a instruction of update data no have a start of control transaction. But, if has a instruction of update, the Natural’s Nucleo make a implicit control transaction.

Is it your question?

if you use SHARED HOLD, you are implicitly in a transaction that needs to be terminated by an END TRANSACTION or BACKOUT TRANSACTION.

See the documentation, e.g.
MODE = S Until the logical transaction is terminated. Releases the record from shared hold when a logical transaction is terminated with an END TRANSACTION or BACKOUT TRANSACTION statement.
MODE=Q and MODE=S ensure that the record being read cannot be updated concurrently by other users until it has been released from hold again.

ok, so using shared hold with mode S but without actually being in a logical transaction would automatically put the records I want to put in shared hold into the other ‘official’ hold ? I guess that makes some sense somewhere.

I know it’s a far fetched example, but I just happened to notice that Natural allowes this situation so I wondered what would happen.