Start of change

IFS_OBJECT_REFERENCES_INFO table function

The IFS_OBJECT_REFERENCES_INFO table function returns a single row result table that contains information about integrated file system references on an object.

This information is similar to what is returned by the Retrieve Object References (QP0LROR) API. The information may not be complete for objects residing in file systems other than the root (/), QOpenSys, and user-defined file systems.

Authorization: The user must have:
  • Execute (*X) data authority to each directory preceding the object whose references are to be obtained and
  • Read (*R) data authority to the object whose references are to be obtained.
Read syntax diagramSkip visual syntax diagram IFS_OBJECT_REFERENCES_INFO ( PATH_NAME => path-name,DETAILED_INFO => detailed-info,IGNORE_ERRORS => ignore-errors)
path-name
An expression that defines the path name to the object whose reference information is to be returned. If the last element of the path is a symbolic link, the reference information will be for the symbolic link itself. If an absolute path name is not specified, the current working directory is used in combination with the relative path name to resolve to the object.
detailed-info
A character or graphic string expression that indicates the type of information to be returned.
NO
Only basic information is returned. Values for columns through the CHECKED_OUT_USER_NAME are returned; NULL is returned for the remaining columns. This is the default.
YES
Values are returned for all columns.
ignore-errors

A character or graphic string expression that identifies what to do when an error is encountered.

NO

An error is returned.

YES
A warning is returned.
No row is returned when an error is encountered. This is the default.

The result of the function is a table containing a single row with the format shown in the following table. All the columns are nullable.

Table 1. IFS_OBJECT_REFERENCES_INFO table function
Column Name Data Type Description
PATH_NAME DBCLOB(16M) CCSID 1200 The full path name of the object.
REFERENCE_COUNT INTEGER Current number of references on the object. This may be 0 even though IN_USE has a value of YES.
IN_USE VARCHAR(3) Whether the object is currently in use.
NO
The object is not in use and all of the reference type fields are 0.
YES
The object is in use. At least one of the reference type fields is greater than 0. This condition may occur even if REFERENCE_COUNT is 0.
RO_COUNT INTEGER Total number of read only access references.
WO_COUNT INTEGER Total number of write only access references.
RW_COUNT INTEGER Total number of read and write access references.
XO_COUNT INTEGER Total number of execute only access references.
SHARE_R_COUNT INTEGER Total number of references where the sharing mode allows sharing with read and execute access intents only.
SHARE_W_COUNT INTEGER Total number of references where the sharing mode allows sharing with write access intents only.
SHARE_RW_COUNT INTEGER Total number of references where the sharing mode allows sharing with read, execute, and write access intents.
SHARE_NONE_COUNT INTEGER Total number of references where the sharing mode allows sharing with no other access intents.
ATTRIBUTE_LOCK VARCHAR(3) Indicates whether attribute changes are prevented.
NO
Attribute changes are not prevented.
YES
Attribute changes are prevented.
SAVE_LOCK VARCHAR(3) Indicates whether the object is being referenced by an object save operation.
NO
Object is not being referenced by an object save operation.
YES
Object is being referenced by an object save operation.
INTERNAL_SAVE_LOCK VARCHAR(3) Indicates whether the object is being referenced internally during a save operation on a different object.
NO
The object is not being referenced internally during a save operation on a different object.
YES
The object is being referenced internally during a save operation on a different object.
LINK_CHANGES_LOCK VARCHAR(3) Indicates whether changes to links in the directory are prevented.
NO
Changes to links in the directory are not prevented.
YES
Changes to links in the directory are prevented.
CHECKED_OUT VARCHAR(3) Indicates whether the object is currently checked out.
NO
The object is not checked out.
YES
The object is checked out.
CHECKED_OUT_USER_NAME VARCHAR(10) The name of the user who has the object checked out.

Contains the null value if CHECKED_OUT is NO.

Values are returned for the following columns when the DETAILED_INFO parameter is YES. They will contain the null value if DETAILED_INFO is NO.
RO_SHARE_R_COUNT INTEGER Total number of read only access references. The sharing mode allows sharing with read and execute access intents only.
RO_SHARE_W_COUNT INTEGER Total number of read only access references. The sharing mode allows sharing with write access intents only.
RO_SHARE_RW_COUNT INTEGER Total number of read only access references. The sharing mode allows sharing with read, execute, and write access intents.
RO_SHARE_NONE_COUNT INTEGER Total number of read only access references. The sharing mode allows sharing with no other access intents.
WO_SHARE_R_COUNT INTEGER Total number of write only access references. The sharing mode allows sharing with read and execute access intents only.
WO_SHARE_W_COUNT INTEGER Total number of write only access references. The sharing mode allows sharing with write access intents only.
WO_SHARE_RW_COUNT INTEGER Total number of write only access references. The sharing mode allows sharing with read, execute, and write access intents.
WO_SHARE_NONE_COUNT INTEGER Total number of write only access references. The sharing mode allows sharing with no other access intents.
RW_SHARE_R_COUNT INTEGER Total number of read and write access references. The sharing mode allows sharing with read and execute access intents only.
RW_SHARE_W_COUNT INTEGER Total number of read and write access references. The sharing mode allows sharing with write access intents only.
RW_SHARE_RW_COUNT INTEGER Total number of read and write access references. The sharing mode allows sharing with read, execute, and write access intents.
RW_SHARE_NONE_COUNT INTEGER Total number of read and write access references. The sharing mode allows sharing with no other access intents.
XO_SHARE_R_COUNT INTEGER Total number of execute only access references. The sharing mode allows sharing with read and execute access intents only.
XO_SHARE_W_COUNT INTEGER Total number of execute only access references. The sharing mode allows sharing with write access intents only.
XO_SHARE_RW_COUNT INTEGER Total number of execute only access references. The sharing mode allows sharing with read, execute, and write access intents.
XO_SHARE_NONE_COUNT INTEGER Total number of execute only access references. The sharing mode allows sharing with no other access intents.
XR_SHARE_R_COUNT INTEGER Total number of execute and read access references. The sharing mode allows sharing with read and execute access intents only.
XR_SHARE_W_COUNT INTEGER Total number of execute and read access references. The sharing mode allows sharing with write access intents only.
XR_SHARE_RW_COUNT INTEGER Total number of execute and read access references. The sharing mode allows sharing with read, execute, and write access intents.
XR_SHARE_NONE_COUNT INTEGER Total number of execute and read access references. The sharing mode allows sharing with no other access intents.
CURRENT_DIRECTORY_COUNT INTEGER Total number of jobs where the object is a directory that is being used as the current directory of the job.
ROOT_DIRECTORY_COUNT INTEGER Total number of jobs where the object is a directory that is being used as the root directory of the job.
FILE_SERVER_REFERENCE_COUNT INTEGER Total number of jobs where the File Server is holding a generic reference on the object on behalf of a client.
FILE_SERVER_WORKING_DIRECTORY_
COUNT
INTEGER Total number of jobs where the object is a directory, and the File Server is holding a working directory reference on it on behalf of a client.
NFS_SERVER_REFERENCE_COUNT INTEGER Total number of jobs where the Network File System (NFS) Version 4 server job is holding a generic reference on the object on behalf of a client.

Example

  • Determine how /usr/test is currently being used.
    SELECT * FROM TABLE (QSYS2.IFS_OBJECT_REFERENCES_INFO(PATH_NAME => '/usr/test'));
    
End of change