-L Parameter Error

mprabu_p

New Member
Hi All,

I am using Progress 9.1 version. When i run the program it shows the error message "Lock Table Over flow - L ". Any one can you please explain what is the meaning of this error?
 

tamhas

ProgressTalk.com Sponsor
It means that you are locking too many records in a single transaction. There are special cases where there is an inherent need to lock a lot of records at one time, e.g., a customer I used to have that would receive a single check that paid off 20-30,000 invoices. But, most of the time the issue is a transaction scope that is higher than you think it is, causing a very large number of what should be small atomic transactions to be lumped into one transaction. COMPILE XREF on potentially offending programs will often reveal unexpected transaction scope, although one of the sneaky ways of getting this problem is to have a program with perfectly reasonable transaction structure on its own and then call it from another program where a transaction is already open, thus resulting in everything in the sub program being part of a single transaction. Another possible cause, though less typical, is doing a FOR EACH EXCLUSIVE on a table where the WHERE clause results in reading a large number of records without the benefit of a good index, so that many records have to be read before matching records are found. That results in locking all the skipped records until the desired record is found.
 

mprabu_p

New Member
HI tamhas,

Thanks for your reply. it is very useful for me? . Please clarify me the following also

I ma haveing 27 lacks(2,712,782) data in our custom table. But i want only certain "OK" status record only. i have checked in the table "OK" record is nearly 27000 records only. I have created one temp table and move that 27000 reords to that temp table. After i loop through the temp table like the following

for temp:

find first cust- table where custom .a = tmp.a
no-lock no-error.
if available cust-table then
do:
assign cust fields.
end.
end. /* For each */

But at that time also i got the "-L Error".

Note:
If i use "Repeat Transaction" commend in my program it shows the error message. but if i use "Repeat" statement it didn't show -L error message.

Why it is shows the error message when i using the temp table?
What is lock table?
if use proper index can i resolve this problem? Please Help?
 

Casper

ProgressTalk.com Moderator
Staff member
If you have that many records in your table and field a is not indexed then you are going to do a sequential search trhough the entire table.

Furthermore, your example can't be correct because you read the record with no-lock and then try to update it.

If you really need to do this then you can scope the transaction to just this one record with the following:
If you have a temp-table with those records then its better to store something more unique like rowid instead of the field a:

Code:
define buffer b-cust for cust.
for each temp-table,
     first b-cust where rowid(b-cust) = temp.rrowid exclusive-lock: /* new field) with rowid of cust table */
 
     assign b-cust.fields.
     release b-cust.
end. /* For each */

Casper.
 

tamhas

ProgressTalk.com Sponsor
Try COMPILE XREF to see the transaction scope. Chances are it is higher than you think.
 

mprabu_p

New Member
Hi,
Thanks for your reply.

can you please explain what is COMPILE XREF? Usually i use the commend "compile ./xxcust.p save into us/xx". What is different b/w these two? Are you having any document to see about COMPILE XREF.

Thanks.

Prabu.
 

tamhas

ProgressTalk.com Sponsor
Check your manual for the LISTING and XREF options. Here, I guess you actually want LISTING which gives you a second output in a file of your choosing which shows the block structure, transaction scope, and record scope. E.g.

compile ./xxcust.p save into us/xx listing "xxcust.p_l".
 
Top