No other job can access the file while this job is running. I need to let others use file after user hits enter. The file is not a update file on add records to it. So do not need it locked at all.
William Moore
California Fine Wire
805-489-5144
wjmoore@xxxxxxxxxxxx
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Hockchai Lim
Sent: Friday, July 01, 2011 9:32 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Help with record lock
What type of error are you encountering?
e.g ==> No other job can access/open the file at all?, Record lock when other job try to read any or a particular record in the file...?
"Willie J. Moore" <WJMoore@xxxxxxxxxxxx> wrote in message
news:mailman.338.1309537199.2630.rpg400-l@xxxxxxxxxxxx...
Good question. When the job runs it locks the zzuser2 file so no other
updates can use it.
William Moore
California Fine Wire
805-489-5144
wjmoore@xxxxxxxxxxxx
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Hockchai Lim
Sent: Friday, July 01, 2011 8:12 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Help with record lock
A bit confuse here. Your email subject indicates "...record lock" but email
content says you use WRKOBJLCK to determine if lock is released. WRKOBJLCK
determines lock at the Object (file) level. Record lock is at the file
record level. Are you trying to resolve a record lock or file lock issue?
"Willie J. Moore" <WJMoore@xxxxxxxxxxxx> wrote in message
news:mailman.208.1309468264.2630.rpg400-l@xxxxxxxxxxxx...
There are times when you think you know what you are doing and then RPG says
no you don't.
I am having trouble in clearing a record lock in the following program. I
check for a lock using the WRKOBJLCK command.
C againgood tag
C exsr clrscn
C exfmt scrn01
C read zzuser2
C*
C write zzuser
C unlock zzuser2
C time dtime
C exfmt scrn01
C end
C goto againgood
C*
C ENDLR tag
C seton LR
I want the file zzuser2 to be released after the write. When I check the
file it shows the file is still locked even after the 'unlock' as processed.
Any help would be greatly appreciated.
William Moore
California Fine Wire
805-489-5144
wjmoore@xxxxxxxxxxxx
As an Amazon Associate we earn from qualifying purchases.