Some times While checking MSGW for object / member /
record locks ,I have seen it's locked by itself ...? How
it happen and what action we need to perform if job is
updating / writing a record....?
Answers were Sorted based on User's Feedback
Answer / guru
Usually a record lock will happen when you read a file
itself. To avoid file locks, use the following ways
1.Read(N)Read with no lock
2.When your file is in update mode and if you use any chain
function, then use Chain(N)
Cheers...
Is This Answer Correct ? | 13 Yes | 1 No |
Answer / duvara (duvara.cse@gmail.com)
when the file is opened in update mode, when u chain the
same record two time continuously with out any updation bw
2 chains then u can face this problem. because the record
is locked by the first chain operation, so cannot chain the
same record again.
To relese the record simply update that record befor the
next chain/read.
Is This Answer Correct ? | 6 Yes | 2 No |
Answer / rakesh roshan
This is true because either it must be updating the File or
Writing the record to the file and it places *EXCL Lock .
To handle such exception it depends upon the
Application ,if we want to handle such lock we can chain(N)
extender but then we need to see whether the File it is
writing or updating is having some constraints associated
or not , if yes
then we can handle the exception by using %Status of PSDS
DS and wait for few seconds and Retry it .
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / kathan
when u open file in update mode the record is automatic lock
to remove these condition u can use in ipc prompt N in H/N/P
entry
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / roshan.wankar
Before Perform Read operation, use SETLL and check Low
indicator is *ON then record is locked
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / syam
Two user is trying to write or update same record it is
geting lock.
1. Do change in your program all view and report program
open om Read mode only.
2. Do change in your program before update or write check
record is used by another user or not.
Is This Answer Correct ? | 2 Yes | 6 No |
How to update physical file in rpgle without using display file?
How can you determine the number of characters in a variable?
What is SFLNXTCHG keyword why it has used and where? Briefly explain with Example.
How can i check the object existance in RPG program without using QCMDEXC command.
I have two sessions S1 & S2 under this 3 jobs(say j1,j2,j3 under session S1) And 2 jobs(Say j4, j5 Under session S2)is running. How many QTEMP & how many LDA will create for the same.
How to find d key field of a pf that doesn’t have source physical file?
what is overlay? how can we pass parameters in cl or rpg programing? how can we get data area value in cl or rpg programming?
I have a file .In that file i have 3 fields. Those fields are eno, ename, esal.Keyfield is eno. In that file i have data like this for eno 1,2,3,4,5. Now i need to display 2nd record. That means i need to set the pointer on 2nd record... Then, write the complete rpg program using setll.
In a particular program one file is used where override command is applied to a file, now this program calls another program where we want to use the same file but without override.How it can be done?
1.what are the ARITHMETIC EXPRESSIONS IN CL PGM? 2.How to PASSING PARAMETER TO CL PGM?
Q:HI friends accually ihave one problem plesase let me know the alternate code of this code. Related field description of code: Add a field, CALvsPRD, "Calendar Day Starts Before/After Production Day" to the parameter set WRKORDER which accepts values 'A' or 'B' o B = Calendar Day Starts Before Production Day o A = Calendar Day Starts After Production Day o Any other value indicates the production and calendar dates are always the same. code: Automatic Execution Of *INZSR Subroutine /Z01 * retrieves WRKORDER field values. /Z01 * Calculate default Production Date and return it to caller. /Z01 * Production date defaults to system date /Z01 C Eval P@Pdate = %DATE() /Z01 * unless Calendar date starts Before PDN(production) date and /Z01 * system time is before PDN Start Time then /Z01 * PDN date is yesterday. /Z01 C If W@CALvsPRD = 'B' and /Z01 C %TIME() < %TIME (W@Strtime) /Z01 C Eval P@Pdate -= %Day(1) /Z01 * unless Calendar date starts After PDN date and /Z01 * system time is *GE PDN(production) Start Time then /Z01 * PDN date is tomorrow. /Z01 C ElseIf W@CALvsPRD = 'A' and W@Strtime > *Zero and /Z01 C %TIME() >= %TIME (W@STrtime) /Z01 C Eval P@Pdate += %Day(1) /Z01 C EndIf /Z01 C Eval *InLr = *On
purpose of pannel group??/