Topic
1 reply Latest Post - ‏2013-01-28T23:47:37Z by SystemAdmin
SystemAdmin
SystemAdmin
8523 Posts
ACCEPTED ANSWER

Pinned topic Convert MQ Correlid to 48 character string using ESQL in Message Broker

‏2013-01-28T15:41:20Z |
In a messgae broker flow I have a need to convert MQ corellation Id to a 48 character sting to
use as a key field when accessing a DB2 table.
After much searching on the internet I found java code that works.
I was never able to find any ESQL to do the same. Can this be done with ESQL?
Is doing it in JAVA the only or prefered way?
Updated on 2013-01-28T23:47:37Z at 2013-01-28T23:47:37Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    8523 Posts
    ACCEPTED ANSWER

    Re: Convert MQ Correlid to 48 character string using ESQL in Message Broker

    ‏2013-01-28T23:47:37Z  in response to SystemAdmin
    CorrelId is a 24 byte binary field. MessageId is the same type of field. The simplest solution is to convert this to a 48 character hexadecimal representation. eg. if CorrelId contains 3 bytes with binary values 18, 26, 50 (decimal), the 6 printable characters of hexadecimal are "121A32". Can this conversion be done in ESQL? Sorry, I don't know.