0 pts.
 RPG/400
what type of opcodes release lock on a record

Software/Hardware used:
ASKED: July 29, 2008  10:32 AM
UPDATED: October 6, 2011  7:23 AM

Answer Wiki:
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  Gilly400   23,625 pts.
All Answer Wiki Contributors:  Gilly400   23,625 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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)

 45 pts.

 

Hi,

The READ, CHAIN and SETLL don’t necessarily unlock records, especially not if you’re using commitment control.

Regards,

Martin Gilbert.

 23,625 pts.

 

… 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. :-o

 300 pts.

 

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

 5,505 pts.