I'd like to get some advice on how to delete PC files on my iSeries. Recently, I copied a PC file to an iSeries folder through Windows Explorer, which worked fine. Unfortunately, when I tried to delete that file, I got the error, "Cannot delete 'filename': It is being used by another person or program. Close any program that my be using the file and try again." I restarted my PC and again tried to delete the file but the same error appeared. What is the best method to delete a PC file through Windows Explorer?
Most likely it is an authorization issue. Are you authenticated on the iSeries, or just using the Guest Access? I can't remember for sure, but if you use Guest, you probably cannot delete PC files off of the iSeries without changing the authorization. You can either use the EDTOBJAUT command, and change *PUBLIC access to *ALL, or you will need to use the WRKLNK command if in the IFS.
With NetServer you can set a share to "read only" and even with QSECOFR you would not be able to delete the IFS objects. If you can delete the files via WRKLNK and can't delete them with network neighborhood, then use iSeries Navigator to set it to "Read/Wire" on the share.
Sometimes objects are in a locked status by another job and you cannot delete them. To make sure that your file is not locked, use following commands:
- WRKFLR to check the folder and document object name.
- DSPDLONAM DLO(document-name) FLR(Folder_name)
- Jot down the System Object Name.
- WRKOBJLCK OBJ(QDOC/system-object-name) OBJTYPE(*DOC)
- If you see any jobs, then you need to end them to unlock the object (use option-4 to end the job).
- Now try to delete the file again.
Not yet using ITKnowledge Exchange, our innovative peer networking feature for Oracle and other IT professionals? Register and fill out your profile so you can ask specific sets of people your IT questions and also help out your fellow geeks.
This was first published in February 2005