Author |
Message
|
SNEHA09548 |
Posted: Tue Jan 31, 2017 9:55 pm Post subject: Hexadecimal to ASCII conversion using DFDL |
|
|
Newbie
Joined: 31 Jan 2017 Posts: 4
|
Request you to guide me, Is it possible to convert hex value to ascii format using dfdl. I am working on financial transaction message and facing DFDL parsing issue, value is not getting properly parsed. Is there any specific code page which can be used to encode the value into required format. Kindly suggest.
Please find below sample message:
Hex Input : 353232323233323237343339 Required ASCII/String Output : 522223227439
Not sure about the name of the format.[/b] |
|
Back to top |
|
 |
timber |
Posted: Wed Feb 01, 2017 12:56 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
|
Back to top |
|
 |
zpat |
Posted: Wed Feb 01, 2017 1:13 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Hex representation is not actually a code page.
It is a printable way of representing the binary value of one byte as two hex digits.
If you treat printable hex as data, it won't work very well. If the input really is printable hex data, then you need to convert each two character hex digit back into a single byte of actual data.
ESQL has the CAST function which can help with this. If DFDL can do it then I am sure Tim will know how. _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
SNEHA09548 |
Posted: Wed Feb 01, 2017 2:52 am Post subject: |
|
|
Newbie
Joined: 31 Jan 2017 Posts: 4
|
Yes , I am working with ISO8583 DFDL |
|
Back to top |
|
 |
sukhi |
Posted: Wed Feb 01, 2017 8:49 pm Post subject: |
|
|
Novice
Joined: 22 Nov 2016 Posts: 18
|
Hi Sneha,
please try below statement
cast(blobvar as char CCSID 819)
Regards
Sukhendra |
|
Back to top |
|
 |
SNEHA09548 |
Posted: Wed Feb 01, 2017 9:03 pm Post subject: |
|
|
Newbie
Joined: 31 Jan 2017 Posts: 4
|
Hi Sukhendra,
Thanks!!
I know it will work with below mentioned statement , but I want to avoid ESQL coding .
And want to know if its possible to get the required output using DFDL ?? |
|
Back to top |
|
 |
timber |
Posted: Thu Feb 02, 2017 3:52 pm Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Quote: |
want to know if its possible to get the required output using DFDL |
I believe there is a DFDL schema on GitHub for this variant of ISO8583. When I solved it, I used ESQL to convert the bitmaps into the format required by the standard DFDL schema. |
|
Back to top |
|
 |
|