paulwesterman
New Member
I have a problem with getting exclusive locks released.
I am updating a record in the table that stores my sales order numbers. The table (param-file) stores all kinds of different numbers that we use for various purposes and each record has a unique indentifier field. For example the sales order numbers are linked to the field 'number' where the value is 'sales' and the value of the sales order number is stored in the field 'ordref'. I have a procedure that runs an external procedure to get the current sales order number 'ordref" and then increases the number by 1 and then the external procedure does a bunch of other stuff before returning to the original procedure. My code in the external procedure is:
find param-file where param-file.number = 'sales' exclusive-lock no-error.
if avail param-file
then do:
assign v-ordref = param-file.ordref
param-file.ordref = param-file.ordref + 1.
end.
find current param-file no-lock no-error.
<lots more things happen here then I return to the calling procedure.>
My problem is 'find current param-file no-lock no-error' doesn't change the lock status. The exclusive-lock doesn't release. We have a multi-user environment and if the user goes to lunch in the middle of the procedure other users are locked out of the param-file.
We are running Progress Version 9.1C19 on UNIX.
I am updating a record in the table that stores my sales order numbers. The table (param-file) stores all kinds of different numbers that we use for various purposes and each record has a unique indentifier field. For example the sales order numbers are linked to the field 'number' where the value is 'sales' and the value of the sales order number is stored in the field 'ordref'. I have a procedure that runs an external procedure to get the current sales order number 'ordref" and then increases the number by 1 and then the external procedure does a bunch of other stuff before returning to the original procedure. My code in the external procedure is:
find param-file where param-file.number = 'sales' exclusive-lock no-error.
if avail param-file
then do:
assign v-ordref = param-file.ordref
param-file.ordref = param-file.ordref + 1.
end.
find current param-file no-lock no-error.
<lots more things happen here then I return to the calling procedure.>
My problem is 'find current param-file no-lock no-error' doesn't change the lock status. The exclusive-lock doesn't release. We have a multi-user environment and if the user goes to lunch in the middle of the procedure other users are locked out of the param-file.
We are running Progress Version 9.1C19 on UNIX.