SQL_CHECK_AUTHORITY scalar function

The SQL_CHECK_AUTHORITY scalar function returns an indication of whether the effective user of the thread is authorized to query the specified *FILE object, either directly, as a member of a group profile, or through adopted authority.

Authorization: None required.

Read syntax diagramSkip visual syntax diagramSQL_CHECK_AUTHORITY(library-name ,file-name)
The schema is QSYS2.
library-name
Library name containing the file.
file-name
File name for which authority will be examined.

The result of the function is SMALLINT.

The function returns the following values:
0
The user does not have authority to query the file, the object is not a *FILE object, or the object does not exist.
1
The user is authorized to query the file.