IBM i Services to Find Jobs Holding IFS File References
Dawn May shares how to use IBM i Services to display usage information for files.
By Dawn May03/19/2020
Using the QSYS.IFS_JOB_INFO()service, you can find the IFS object references for a given job. Using the QSYS2.IFS_OBJECT_LOCK_INFO(), you can find the job for a given object in the IFS.
As an example, I have a simple text file in my home directory that I had opened to edit via EDTF. When you know the job name, the IFS_JOB_INFO service will return information about object references for that job.
SELECT * FROM TABLE(QSYS2.IFS_JOB_INFO(JOB_NAME => '951043/DAWNM/QPADEV0056'));
This command returns many columns of information. The screen capture below shows the path name, the reference count, and the type of reference in use.
Dawn May is an IBM i consultant. She owns Dawn May Consulting, LLC in the Greater Boston area. Dawn is a former IBM senior technical staff member.
See more by Dawn May