If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
sir i can understand record lock.
what is meant by object lock requests,held locks and locks waiting to be applied(wrkobjlck)
why should we apply for locks
my physical file name is pf004 and rollnu is the key field for that file and i tried to read pf004 in reverse using Opnqryf in CL400 and display the field stunam present in pf004 in reverse order
CPF4174 – OPNID
You probably called this program twice – the first time left the opnid Pf004
Because it failed before it got to the END:
Issue a CLOF from the command line to clear your lock
Phil
sir thanks for your answer can any one give me the coding for that.lets say the database file name is filea.
opnqryf (filea) qryslt (………..)
sir i can understand record lock.
what is meant by object lock requests,held locks and locks waiting to be applied(wrkobjlck)
why should we apply for locks
DCLF FILE(SURESH4001/PF004)
OVRDBF FILE(PF004) SHARE(*YES)
OPNQRYF FILE((PF004)) KEYFLD((ROLLNU *DESCEND)) +
UNIQUEKEY(*ALL)
TAG: RCVF RCDFMT(RR)
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(END))
SNDUSRMSG MSG(&STUNAM)
GOTO CMDLBL(TAG)
END: CLOF OPNID(PF004)
DLTOVR FILE(PF004)
ENDPGM
I used the above mentioned coding in CL400 sir
but error comes that CPF4174 is received by the program
my physical file name is pf004 and rollnu is the key field for that file and i tried to read pf004 in reverse using Opnqryf in CL400 and display the field stunam present in pf004 in reverse order
…that CPF4174 is received by the program
Then you should follow the instructions that are contained in the CPF4174 message and fix the error.
Tom
what is meant by object lock requests,held locks and locks waiting to be applied(wrkobjlck)
why should we apply for locks
This is unrelated to the problem about OPNQRYF. It needs to be in a question by itself.
Tom
CPF4174 – OPNID
You probably called this program twice – the first time left the opnid Pf004
Because it failed before it got to the END:
Issue a CLOF from the command line to clear your lock
Phil