Access Check UDFs

This section includes list of UDFs that can be used to check select access-related information.

pty_checkselaccess

This UDF checks whether a database user has unprotect access for a set of data elements. To run this UDF, the database user should be granted access rights for protection.

Signature:

pty_checkselaccess(dataelement<n> VARCHAR, resultlen INTEGER, communicationid INTEGER)

Parameters:

NameTypeDescription
dataelement1VARCHARSpecifies the name of the data element to check.
dataelement2VARCHARSpecifies the name of the data element to check.
dataelement3VARCHARSpecifies the name of the data element to check.
resultlenINTEGERSpecifies the length of the buffer to hold the result.
communicationidINTEGERSpecify the value as 0. This parameter is deprecated.

Returns:

The function returns a 3-CHARACTER string.

  • Position 1: Value 1 indicates select permissions on dataelement1, value 0 indicates no select permissions
  • Position 2: Value 1 indicates select permissions on dataelement2, value 0 indicates no select permissions
  • Position 3: Value 1 indicates select permissions on dataelement3, value 0 indicates no select permissions

Exception:
None

Example:

select pty_checkselaccess('AES256', 'AES128', 'AES128_IV_CRC_KID', 3, 0);

Last modified : February 20, 2026