Skip to Content
author's profile photo Former Member
Former Member


I have a program that is running all of the time. I am getting data from another system to build a shipment.

My program checks for locks before it begins. It locks the delivery and shipment after it starts.

I am running into problems. The shipment requires that the flags be removed prior to changes. The changes from the other system can include changes to the deliveries (removing or adding them.) So I change the shipment in many different steps. And I have to commit the work on each of the steps. When I commit the work the locks are removed.

For example:

1. Lock records.

2. Remove the flags.

3. Commit the work.

4 Lock the records for the next step.

Between 3 and 4 a different process can and does lock the records that are being used. Once the records are locked the next step can not continue. The program does a loop where it waits for 20 seconds and trys again. However, I don't want to leave it in that loop forever. The total amount of retrys is 10 before it gives up and sends a message to the user.

However, that leaves the shipment in a "half processed" status.

Has anyone run into this problem before? What was your solution? This is causing issues on my production server. Due to the amount of times I update a shipment, it can have all the stages removed. If that happens no other processing can be done on the shipment.

Thank you!


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jul 21, 2009 at 07:00 PM

    Just cleaning house. I really didn't find an easy solution. I did lock the entire shipment down by using a Z* table. Then I checked for the Z table lock before processing.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.