Float UDFs for No Encryption

pty_floatins

This UDF can be used only with the No Encryption data element.

Signature:

pty_floatins(col FLOAT, dataelement VARCHAR, resultlen INTEGER, communicationid INTEGER, scid INTEGER)

Parameters:

NameTypeDescription
colFLOATSpecifies the data to protect.
dataelementVARCHARSpecifies the name of the data element.
resultlenINTEGERSpecifies the length of the buffer to hold the result.
communicationidINTEGERSpecify the value as 0. This parameter is deprecated.
scidINTEGERSpecify the value as 0. This parameter is deprecated.

Returns:
The function returns the input value as it is.

Exception:
If the user does not have protect access rights in the policy, then the UDF terminates with an error message explaining what went wrong.

Example:

select pty_floatins(26656.0, 'NoEncryption', 100, 0,0);

pty_floatsel

This UDF unprotects the float value for a No Encryption data element.

Signature:

pty_floatsel(col FLOAT, dataelement VARCHAR, communicationid INTEGER, scid INTEGER)

Parameters:

NameTypeDescription
colFLOATSpecifies the data to unprotect.
dataelementVARCHARSpecifies the name of the data element.
resultlenINTEGERSpecifies the length of the buffer to hold the result.
communicationidINTEGERSpecify the value as 0. This parameter is deprecated.
scidINTEGERSpecify the value as 0. This parameter is deprecated.

Returns:

  • The function returns the input value as it is.
  • The function returns the protected value if this option is configured in the policy and the user does not have access to the data.
  • The function returns NULL when the user has no access to the data in the policy.

Exception:
If you configure an exception in the policy and the user does not have access, then the UDF terminates with an error message explaining what went wrong.

Example:

select pty_floatsel(pty_floatins(26656.0, 'NoEncryption', 100, 0,0), 'NoEncryption', 0,0);

pty_floatselex

This UDF unprotects the float value protected with a No Encryption data element.

Signature:

pty_floatselex(col FLOAT, dataelement VARCHAR, communicationid INTEGER, scid INTEGER)

Parameters:

NameTypeDescription
colFLOATSpecifies the data to unprotect.
dataelementVARCHARSpecifies the name of the data element.
communicationidINTEGERSpecify the value as 0. This parameter is deprecated.
scidINTEGERSpecify the value as 0. This parameter is deprecated.

Returns:

  • The function returns the input value as it is.
  • The function returns the protected value if this option is configured in the policy and the user does not have access to the data.
  • The function returns an error instead of NULL if the user does not have access.

Exception:
If the user does not have access rights in the policy, then the UDF terminates with an error message explaining what went wrong.

Example:

select pty_floatselex(pty_floatins(26656.0, 'NoEncryption', 100, 0,0), 'NoEncryption', 0,0);

Last modified : February 20, 2026