Table of Contents

Search

  1. Preface
  2. The Transformation Language
  3. Constants
  4. Operators
  5. Variables
  6. Dates
  7. Functions
  8. Creating Custom Functions
  9. Custom Function API Reference

Transformation Language Reference

Transformation Language Reference

DEC_HEX

DEC_HEX

Decodes a hex encoded value and returns a binary value with the binary representation of the data.
To use the
DEC_HEX
function, set the environment variable
INFA_ENABLE_BINARY_FUNCTIONS
to True or Yes.

Syntax

DEC_HEX(
value
)
The following table describes the argument for this command:
Argument
Required/
Optional
Description
value
Required
String datatype. Hex data that you want to decode to binary. Hex data can include a leading 0x or 0X, but this is not required. Characters A through F in input data can be upper or lower case.

Return Value

Binary decoded value.
NULL if the input is a null value.
If the input string contains characters other than 0 through 9 or A through F (in upper or lower case) then an error is returned. A leading 0x or 0X to indicate hex content is allowed and will not cause an error to be returned.

Example

You encoded WebSphere MQ message IDs and wrote them to a flat file in Hex format during a workflow. You want to read data from the flat file source, including the WebSphere MQ message IDs. You can use
DEC_HEX
to decode the IDs and convert them to their original binary value.