I found the following link on this topic.
https://www.ibm.com/support/pages/lock-enforcement-rules
Objects are allocated on the basis of their intended use (read or update)
and whether they can be shared (used by more than one job). The file and
member are always allocated *SHRRD and the file data is allocated with the
level of lock specified with the lock state. A lock state identifies the use
of the object and whether it is shared.
However if I do a
ALCOBJ OBJ((LIB/QCLLESRC *FILE *EXCL TEST))
The following is displayed in PDM and I cannot modify the contents of the
member.
TEST *IN USE
If I do not specify a member name, it appears to select the first member by
default and the first member shows "*IN USE".
ALCOBJ OBJ((LIB/QCLLESRC *FILE *EXCL))
Also remember that the first Member in a file is usually the first member
added to a file and not the first in the alphabetical list that you would
see in PDM.
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Sam_L
Sent: Tuesday, February 20, 2024 8:47 AM
To: midrange-l@xxxxxxxxxxxxxxxxxx
Subject: Exclusive LOCK on a physical file
I do ALCOBJ OBJ((QCLSRC *FILE *EXCL))
This doesn't specify a member, but it appears to put an *EXCL lock on only
the first member.
WRKOBJLCK OBJ(QCLSRC) OBJTYPE(*FILE) shows just a *SHRRD lock, even though I
asked for *EXCL:
Job User Lock Status Scope
QPAD155152 LENNONS *SHRRD HELD *JOB
WRKOBJLCK OBJ(QCLSRC) OBJTYPE(*FILE) MBR(*ALL) shows an *EXCL member lock on
the first member:
Member Job User Type Lock Status
CRPGDEBUG QPAD155152 LENNONS MBR *SHRRD HELD
DATA *EXCL HELD
But I can still update other member, e.g., through PDM/SEU.
Is there a way to lock all members in a file with ALCOBJ? (Without looping
through all members and doing It individually that is.)
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: 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
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
.
As an Amazon Associate we earn from qualifying purchases.