In the command CPYFRMIFS, when the command CPYFRMSTMF is used to copy the AS/400 stream file to some data base file, I am getting the error 'Object to be copied is in use'. During this operation, will the job itself locks this object?
Software/Hardware used:
ASKED:
February 26, 2009 2:38 PM
UPDATED:
March 17, 2009 2:43 PM
Thanks for your update.
But even i tried using the same object in another session and ran this job. No use, Even i have checked out the object through iSeries Navigator and then ran this job, but It is not getting locked in this case.
Only in some cases, i am facing the problem. Is there any scenario this can happen? Please help
I take it that in some cases this object will copy and in others it does not.
It does sounf like a lock
The command must be correct for it to ork some of the time.
Can you post the joblog and the error message when this occurs
let have a look at that to see if we can spot anything.
While using the below command,
CPYFRMSTMF FROMSTMF(‘/IDLS/BPCIDMUP/PWPDISP/01539406′) TOMBR(‘/qsys.lib/qtemp.lib/ifsrmw.mbr’) MBROPT(*REPLACE) CVTDTA(*TBL) TBL(‘/QSYS.LIB/QUSRSYS.LIB/Q437337285.TBL’)
The below message is obtained,
Object in use.
An operation to use object /IDLS/BPCIDMUP/PWPDISP/01539406. This object is currently in use.
Can you please advise if the job can be allowed to wait for the reply from the user during the above scenario?
Right now if the above scenario happens, the job just skips this activity and executes the next activity.
Were you able to find out through iSeries Navigator what is locking the file, and whether it’s the job from which you’re running the CPYFRMSTMF command or a different one?
Yes i have checked iSeries Navigator, but it is not showing any locks for this object. Even the field ‘Checked out’ is ‘N’ which means the object is not checked out.
Yes the job does this CPYFRMSTMF.
I tried your command on a text file in the IFS, and was able to get it to copy to a physical file in the QSYS.LIB file system.
So, I suspect something else within that job you’re running or within the program behind the CPYFRMIFS command is locking that object. Have you studied the job log for anything suspect?