[Migrated content. Thread originally posted on 07 November 2007]
This error indicates that you have executed a RECEIVE/WAIT verb in a thread that was previously locked.I expect that you have not intentionally programmed a RECEIVE/WAIT into a thread that can go LOCKED. So I figure that the likely causes of this is either some rare condition allows a flow of your program that does not eventually unlock the thread. Or it is that you just recently have added new code in a shared module, used by both locked and unlocked threads and not taken into consideration that it might be locked.
A very classic cause of these things (not exclusive to COBOL, language independent) is for instance like this:
LOCK THREAD.
OPEN INPUT somefile.
IF somefileError
EXIT PARAGRAPH
END-IF
*DO stuff
CLOSE somefile
UNLOCK THREAD.
...
It can also be caused by hot key programs, exception/event procedures, you name it.



