At the start of your processing, all you need is :-
DO TRANSACTION:
find record-you-want-to-lock exclusive-lock.
END.
carry on ....
This will leave the record in a share-locked state - but not in a
transaction. Find as many records as your lock table will allow.
HTH
>Won't work because it will go out of scope. I need a way to lock the records
>through out the life of the procedure without scoping the whole procedure as
>a transaction.
>> I would think the following would work:
>> DO TRANSACTION:
>> FOR EACH xxxx EXCLUSIVE-LOCK:
>> END. /* for each */
>> END. /* TRANSACTION */
>> I will assume (but could be wrong) that anything inside the DO block will
>> keep a lock because the lock would remain in case you had to UNDO the
>entire
>> transaction. Just be carefull of WHOLE-INDEX searches and possibly
>> overflowing the lock table with too large a record set (pre-V9??). Also
>> test test test to make sure it works.
>> john
>> > I usually use these statements to get a perpetual lock on a single
>record
>> > without initiating a transaction.
>> > DO TRANSACTION:
>> > FIND ----- EXCLUSIVE-LOCK NO-ERROR.
>> > END.
>> > I kinda need to do the same thing, but this time, I need to lock all the
>> > records that is return by a certain query. Apparently, the QUERY
>PRESELECT
>> > with EXCLUSIVE-LOCK statement only locks the current record in the
>buffer.
>> > I'm also trying to find out how to lock entire table. Can I use the
>hidden
>> > file to do this?
>> > Thanks,
>> > Joe
>> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
>> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
>> -----== Over 80,000 Newsgroups - 16 Different Servers! =-----
-----------------------------------------------------------
William Wyatt-Lowe Phone: +44(0)1442 247372
7 East Street Fax: +44(0)1442 264447
HP2 5BN UK Tailored Business Solutions
-----------------------------------------------------------
If it ain't broke - don't fix it