I was wrong. I forgot that the whole thing is inside a transaction scoped to the procedure block.
So, in this case, you aren't seeing a SHARE because of the transaction scoped to the procedure -- it encloses the strong scoped sub-transaction and thus there is no downgrade because a TRX is still active.
This stuff is tricky. Transactions scoped to procedures are bad, bad, bad.
Hi Tom,
Below is the LISTING output and it doesn't say TRANS is active at procedure level. Its strictly at DO block -
c:\progress\trans1.p 06/28/2014 00:32:16 PROGRESS(R) Page 1
{} Line Blk
-- ---- ---
1 def buffer bcust for customer.
2 find customer where customer.custnum = 10 no-lock.
3 1 do for bcust transaction:
4 1 find bcust where bcust.custnum = 10 exclusive-lock.
5 1 bcust.name = "Strong Scope".
6 1 message 1 view-as alert-box.
7 end.
8 message 2 view-as alert-box.
c:\progress\trans1.p 06/28/2014 00:32:16 PROGRESS(R) Page 2
File Name Line Blk. Type Tran Blk. Label
-------------------- ---- ----------- ---- --------------------------------
c:\progress\trans1.p 0 Procedure No
Buffers: sports2000.Customer
c:\progress\trans1.p 3 Do Yes
Buffers: sports2000.bcust