I have an interesting situation. In our order processing system, we have a series of programs. Since there are multiple ways (Punched/Through FTP/Through Telxon units etc.) in which order gets created, the entry programs are different.
So far, we had about 6 to 7 members (Ex. FTP/POS/TLX etc.) in our order file where the orders get created through work file & then the subsequent flow is same for all members until orders get transferred to 'ORDER' member.
Today I added a new member and a new entry point for orders. All programs work fine except one RPG program. This particular program reads LF1(NEWMBR) & updates LF2(NEWMBR). Both LFs are in UPDATE mode. Here I get a record lock condition. Please see the code below.
FLF1 UF E K DISK FLF2 UF E K DISK I@REC1 I FLD1 XFLD1 I FLD2 XFLD2 C KEY2 SETLL LF2 C *INLR DOUEQ'1' C KEY2 READE LF2 LR C *INLR IFEQ '0' C KEY1 CHAIN LF1 91
Since READE would lock the record, CHAIN would fail. But how did it work earlier?
I am on V6R1, if it helps.
Totally clueless on this, any help appreciated.