Error during CPYFRMIFS

50 pts.
Tags:
AS/400 commands
IFS
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?

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • SArunkumar
    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 pointsBadges:
    report
  • Mell0rman
    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 pointsBadges:
    report
  • SArunkumar
    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 pointsBadges:
    report
  • Cwc
    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,290 pointsBadges:
    report
  • SArunkumar
    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 pointsBadges:
    report
  • Cwc
    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,290 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following