Never used LOCK TABLE

This is what Gemini (google) says :

Manual Unlocking: Unlike some databases, there is no UNLOCK TABLE SQL command. On IBM i, you release the lock by:

1. Committing or Rolling back your transaction.
2. Closing the connection/ending the job.
3. Using the CL command DLCOBJ (Deallocate Object) if the lock was scoped to the job.


Paul

From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Patrik Schindler via MIDRANGE-L
Sent: Monday, March 23, 2026 4:38 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: Patrik Schindler <poc@xxxxxxxxxx>
Subject: [V4R5][SQL] Lock and Unlock Tables

Hello, I have found that you can place an exclusive lock tables in V4R5 like this: LOCK TABLE [tablename] IN EXCLUSIVE M͏​​‌͏
[External email]<https://summary.us1.defend.egress.com/v3/summary?ref=email&crId=69c1a4b82e7009e39b70968e&lang=en>
External email <https://summary.us1.defend.egress.com/v3/summary?ref=email&crId=69c1a4b82e7009e39b70968e&lang=en>
[External email]<https://summary.us1.defend.egress.com/v3/summary?ref=email&crId=69c1a4b82e7009e39b70968e&lang=en>


Hello,



I have found that you can place an exclusive lock tables in V4R5 like this:



LOCK TABLE [tablename] IN EXCLUSIVE MODE



However, I was unable to find out how to remove this lock from within SQL. There is no UNLOCK TABLE SQL command.



Any hints?



:wq! PoC



--

This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list

To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx<mailto:MIDRANGE-L@xxxxxxxxxxxxxxxxxx>

To subscribe, unsubscribe, or change list options,

visit: https://lists.midrange.com/mailman/listinfo/midrange-l

or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx<mailto:MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx>

Before posting, please take a moment to review the archives

at https://archive.midrange.com/midrange-l.



Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxxxxxxxxx> for any subscription related questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.