Essentially, I am trying in increment CPY-LAST-BATCH by 1, but I don't think there is any file/record locking in place to prevent two programs from reading the same value before they have a chance to write it.
Is there something I can do to make this work properly?