50 pts.
 Error during CPYFRMIFS
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

Answer Wiki:
Never used that command, but I would say that your job should not be locking the stream file when the command part is run. But I suppose it depends on what your job is doing prior to the command running. Are you able to drill down the IFS at the time of the run using OPSNAV and locate the file. You should be able to click on properties and the USE tab, which should show what is using or locking an IFS object. Hope this helps
Last Wiki Answer Submitted:  February 26, 2009  3:26 pm  by  Mell0rman   270 pts.
All Answer Wiki Contributors:  Mell0rman   270 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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

 50 pts.

 

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.

 270 pts.

 

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.

 50 pts.

 

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?

 4,275 pts.

 

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.

 50 pts.

 

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?

 4,275 pts.