How to: |
Given a privilege code, CHECKPRIVS returns the value Y, if the connected user has that privilege, or N if the user does not have the privilege or the privilege does not exist.
Note: You can see your list of general privileges by clicking the Console (C) button at the top left corner of the window and selecting My Console/Show My General Privileges. A user with Server Administrator privileges can also see the list of general privileges on the Access Control page by right-clicking a user ID, selecting Properties from the context menu and clicking the General Privileges tab on the Properties page.
CHECKPRIVS(privcode, output)
where:
Is the privilege code for which to retrieve the status.
Alphanumeric
Is the name of the field that contains the result, or the format of the output value enclosed in single quotation marks.
The following request retrieves the privilege state for privilege ADPTP (Configure Data Adapter):
-SET &PRIVSTATE = CHECKPRIVS(ADPTP,'A1'); -TYPE Privilege State is: &PRIVSTATE
The output is:
Privilege State is: Y