Start of change

SQL_CHECK_SPECIAL_AUTHORITY scalar function

The SQL_CHECK_SPECIAL_AUTHORITY scalar function returns an indication of whether the effective user of the thread has the specified special authority, either directly, as a member of a group profile, or through adopted authority.

If the user does not have the special authority, no AF-K audit journal entry is produced.

Authorization: None required.

Read syntax diagramSkip visual syntax diagramSQL_CHECK_SPECIAL_AUTHORITY(SPECIAL_AUTHORITY => special-authority )
The schema is QSYS2.
special-authority
A character string containing one system special authority value. It must include the leading * character.

The result of the function is INTEGER.

The function returns the following values:
0
The user does not have the special authority.
1
The user has the special authority.

Example

  • Check whether the current user has *JOBCTL special authority.
    VALUES SQL_CHECK_SPECIAL_AUTHORITY('*JOBCTL');
End of change