Minor changes are by default collapsed in the page history.
No changes
The page does not exist yet.
Failed to load changes
Version by on
Leave Collaboration
Are you sure you want to leave the realtime collaboration and continue editing alone? The changes you save while editing alone will lead to merge conflicts with the changes auto-saved by the realtime editing session.
Information
Important
We are integrating BMC AMI LOBMaster technology into the BMC AMI Reorg product and discontinuing BMC AMI LOBMaster as a separate product. For the latest integrated documentation, see BMC AMI Reorg for Db2 13.1.
VARBINARY(binary_string_expression, length)
The VARBINARY function returns a varying-length binary string that consists of the binary string expression having length, as specified by the function's second argument. The first argument data type is either binary or varbinary. The second argument is a numerical integer constant having a value in the range of 1 through 32704.
If the first argument is nullable, the result will be nullable and if the first argument is null, the result will be the null value.
The following guidelines apply to the second argument:
The specified length is treated as the maximum length.
The actual length of the result will be the minimum of the string expression and the specified length.
If the length is shorter than the source, the string will be truncated without warning.
UNLOAD SELECT VARBINARY(BX’123456’,2) FROM SYSIBM.SYSDUMMY1
This results in the varying binary string of X’00021234’.
Information
UNLOAD SELECT VARBINARY(BX’123456’,5) FROM SYSIBM.SYSDUMMY1
This results in the varying binary string of: X’0003123456’
Warning
Important
For IBM Db2, BINARY and VARBINARY functions accept other types of string expressions such as CHAR and Graphic. BMC AMI Utilities functions are restricted to binary string expressions.