Couple -O- Oddities...
Posted in 1992
I'm observing some strange things happening with an invoicing process
that we're using at a client. The operator fires off an invoice program
that runs in the background and inevitably spools the invoice to the
printer.
They had been complaining about invoices that were completing, so I
modified the invoice program to do the following.
BEGIN WORK
INSERT INTO INVCLOG (...LOG DATA...)COMMIT WORK
BEGIN WORK
CREATE INVOICE
UPDATE ORDER
UPDATE DETAIL
UPDATE INVCLOG (..INVCOICE DONE DATA...)
COMMIT WORK
This pointed out that they were indeed starting several invoices, but
they were not completing (and therefore the work rolledback). Turned out
to be a locking problem (they would run several of things at the same time).
I added a "SET LOCK MODE TO WAIT", in hopes that it would solve the locking
problem during the updates. It has, mostly. We still seem to be seeing
locking problems, even with the LOCK MODE WAIT. Does that make any sense?
Does the LOCK MODE WAIT time out? I know that OnLine will lock multiple rows
on an INSERT (notably the rows before/after the row that being inserted...
something like that), does SE do the same thing?
Anyway, another truly bizarre thing that I'm now find is that some of the
orders say they are invoiced, yet there are no corresponding invoice rows.
This confuses me as they are all one in the same process, with the same
commit.
Anyway, looking for any hints/help/sympathy....
Will
(uunet!la4gen!villy)