How to release lock on a record in RPG/400

7980 pts.
Tags:
RPG
RPG/400
What type of opcodes should I use to release the lock on a record?

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Birddon
    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 pointsBadges:
    report
  • Gilly400
    Hi, The READ, CHAIN and SETLL don't necessarily unlock records, especially not if you're using commitment control. Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • GAC
    ... 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 pointsBadges:
    report
  • Yorkshireman
    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,580 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following