Hi,
The following opcodes should release locks on records.
CLOSE
EXCEPT
REL
UNLOCK
UPDATE
Regards,
Martin Gilbert.
=======================================================
The problem with the lists above and in the Discussion below is that some of the op-codes are from RPG IV and not RPG/400.
For RPG/400, the corrections are EXCPT, UNLCK, UPDAT and COMIT.
Tom
Last Wiki Answer Submitted: May 7, 2010 7:58 am by Gilly40023,625 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
It used to be a standard interview question, Name 7 ways to release a record lock in RPG.
READ (READE READP)
CHAIN
CLOSE
UNLOCK
UPDATE
EXCEPT (for the file)
SETLL (SETGT SETLT)
Hi,
The READ, CHAIN and SETLL don’t necessarily unlock records, especially not if you’re using commitment control.
Regards,
Martin Gilbert.
… if you are using commitment and want to release the record(s) use COMMIT …
But I have experienced that it does not work under some circumstances.
You need to look in the manual relevant to the language you are using.
The issue of when a lock is created, or not, is dealt with fully, precisely, and definitively by the IBM authors who write these things.
Check the DB2 programming and the RPG or RPGLE manuals