Analysis of the HEXDUMP OUTPUT

530 views
Skip to first unread message

mwyc...@gmail.com

unread,
Jun 10, 2009, 12:36:42 PM6/10/09
to jPOS Users
Hi all,

Hoping you are fine.

I have a question regardig the output from hexdump.
When I use the code below, I get the hex output on the stdout,
however, I don't know which of the xters correspond to the bitmap(s).
[code]
System.out.println("HEX Dump");
System.out.println(ISOUtil.hexdump(isomsg.pack()));
[/code]

How does one I dentify the Bitmap string from the returned hexdump
output?

Is it that the Bitmaps are compressed?

thanks.

David Bergert

unread,
Jun 10, 2009, 12:46:35 PM6/10/09
to jpos-...@googlegroups.com
Here is a sample 0800 message I was playing with today:

<isomsg>
  <field id="0" value="0800"/>
  <field id="7" value="0529204738"/>
  <field id="11" value="403568"/>
  <field id="37" value="914920403568"/>
  <field id="70" value="061"/>
</isomsg>


0000  30 38 30 30 82 20 00 00  08 00 00 00 04 00 00 00  0800. ..........
0010  00 00 00 00 30 35 32 39  32 30 34 37 33 38 34 30  ....052920473840
0020  33 35 36 38 39 31 34 39  32 30 34 30 33 35 36 38  3568914920403568
0030  30 36 31                                          061


If you look at the ISO 8583 Spec...  you will notice that it starts with the MTI, is followed by the bitmap, and then the data.

so....

MIT = 30 38 30 30
BITMAP =  82 20 00 00 08 00 00 00 04 00 00 00 00 00 00 00
Start of Data - field 7:  30 35 32 39    --> 0529..

You should be familiar with the very basics of ISO8583 if you are using jPOS ? ? ?
  



David Bergert, CISSP, CISA, CPISM/A
www.paymentsystemsblog.com

Alejandro Revilla

unread,
Jun 10, 2009, 12:49:00 PM6/10/09
to jpos-...@googlegroups.com
>
> How does one I dentify the Bitmap string from the returned hexdump
> output?
>
The first two or four bytes (depending on your packager) are the MTI,
then you have the bitmap, than once again, depending on your packager
can be represented in binary or ASCII form.

>
> Is it that the Bitmaps are compressed?
>

We just compress the bitmaps in the GZipChannel, but that's not the case.

David Bergert

unread,
Jun 10, 2009, 1:22:27 PM6/10/09
to David Bergert, jpos-...@googlegroups.com
And if you want to see how the Bitmap maps the to the field number:


BITMAP =  82 20 00 00 08 00 00 00 04 00 00 00 00 00 00 00


82 - 1000 0010
20 - 0010 0000
00 - 0000 0000
00 - 0000 0000
08 - 0000 1000
00 - 0000 0000
00 - 0000 0000
00 - 0000 0000
04 - 0000 0100
00 - 0000 0000
00 - 0000 0000
00 - 0000 0000
00 - 0000 0000
00 - 0000 0000
00 - 0000 0000
00 - 0000 0000

1000001000100000000000000000000000001000000000000000000000000000
^            ^       ^                                                          ^
MTI       7      11                                                       37

0000010000000000000000000000000000000000000000000000000000000000
          ^
         70


attached is a screenshot if it gets Mangled.





David Bergert, CISSP, CISA, CPISM/A
Technology and Development Director
On-Line Strategies, Inc.
"Always Available"
www.olsdallas.com
ber...@olsdallas.com
(972) 535-8833 (office)
(563) 650-6006 (cell)
www.paymentsystemsblog.com


This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe from this group, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Mark Salter

unread,
Jun 11, 2009, 3:50:07 AM6/11/09
to jpos-...@googlegroups.com
mwyc...@gmail.com wrote:

> How does one I dentify the Bitmap string from the returned hexdump
> output?

Your Packager tells you where the BitMap is (what it follows and precedes).

>
> Is it that the Bitmaps are compressed?

A bitmap will be in the 'raw' form once the message has been .pack()'d.

If you can share some output here and indicate which packager you are
using, I'm sure we can point you at the bitmap. Even without the
Packager name, it should be fairly easy to see...


--
Mark

mwyc...@gmail.com

unread,
Jun 12, 2009, 6:30:58 AM6/12/09
to jPOS Users
Thanks so much David,

It's now clear to me, I just didn't know where the MTI, BITMAP and
Data Elements start.
Do the dots.... after 0800 signify any thing?

regards,



On Jun 10, 7:46 pm, David Bergert <dbergert...@gmail.com> wrote:
> Here is a sample 0800 message I was playing with today:
>
> <isomsg>
>    <field id="0" value="0800"/>
>    <field id="7" value="0529204738"/>
>    <field id="11" value="403568"/>
>    <field id="37" value="914920403568"/>
>    <field id="70" value="061"/>
> </isomsg>
>
> 0000  30 38 30 30 82 20 00 00  08 00 00 00 04 00 00 00  0800. ..........
> 0010  00 00 00 00 30 35 32 39  32 30 34 37 33 38 34 30  ....052920473840
> 0020  33 35 36 38 39 31 34 39  32 30 34 30 33 35 36 38  3568914920403568
> 0030  30 36 31                                          061
>
> If you look at the ISO 8583 Spec...  you will notice that it starts  
> with the MTI, is followed by the bitmap, and then the data.
>
> so....
>
> MIT = 30 38 30 30
> BITMAP =  82 20 00 00 08 00 00 00 04 00 00 00 00 00 00 00
> Start of Data - field 7:  30 35 32 39    --> 0529..
>
> You should be familiar with the very basics of ISO8583 if you are  
> using jPOS ? ? ?
>
> David Bergert, CISSP, CISA, CPISM/Awww.paymentsystemsblog.com
>
> On Jun 10, 2009, at 11:36 AM, mwycli...@gmail.com wrote:
>
>
>
>
>
> > Hi all,
>
> > Hoping you are fine.
>
> > I have a question regardig the output from hexdump.
> > When I use the code below, I get the hex output on the stdout,
> > however, I don't know which of the xters correspond to the bitmap(s).
> > [code]
> > System.out.println("HEX Dump");
> > System.out.println(ISOUtil.hexdump(isomsg.pack()));
> > [/code]
>
> > How does one I dentify the Bitmap string from the returned hexdump
> > output?
>
> > Is it that the Bitmaps are compressed?
>
> > thanks.- Hide quoted text -
>
> - Show quoted text -

Mark Salter

unread,
Jun 12, 2009, 6:42:47 AM6/12/09
to jpos-...@googlegroups.com
mwyc...@gmail.com wrote:

> Do the dots.... after 0800 signify any thing?

Each '.' is a placeholder for each byte that does not have a printable
character equivalent value.

So going across from the 0800, the '.' on the first line have the values:-

0000 30 38 30 30 82 20 00 00 08 00 00 00 04 00 00 00 0800. ..........

x'82'
x'00'
x'00'
x'08'
x'00'
x'00'
x'00'
x'04'
x'00'
x'00'
x'00'

You should look to the expanded values for each value.

hth

--
Mark

mwyc...@gmail.com

unread,
Jun 16, 2009, 12:13:52 PM6/16/09
to jPOS Users
Thanks Mark,

But now which are those bytes that are non printable (is it the bitmap
bytes??)
From the extract below, I see the values for fields 0, 7, 11, 37 and
70 except for the bitmaps.

Hex Dump out put
0800. ..........
....052920473840
3568914920403568
061

Original Msg

<isomsg>
<field id="0" value="0800"/>
<field id="7" value="0529204738"/>
<field id="11" value="403568"/>
<field id="37" value="914920403568"/>
<field id="70" value="061"/>
</isomsg>

How should the values for field 1 and 2 be represented in the XML form
above incase field 1 & 2 where to be dumped?

On Jun 12, 1:42 pm, Mark Salter <marksal...@talktalk.net> wrote:

Mark Salter

unread,
Jun 16, 2009, 1:28:58 PM6/16/09
to jpos-...@googlegroups.com
mwyc...@gmail.com wrote:

> But now which are those bytes that are non printable (is it the bitmap
> bytes??)

Mostly, but it is possible that the bitmap can happen to contain byte
values that are valid (printable) characters.


>>From the extract below, I see the values for fields 0, 7, 11, 37 and
> 70 except for the bitmaps.
>
> Hex Dump out put
> 0800. ..........
> ....052920473840
> 3568914920403568
> 061

So then yes, the dots indicate each byte of the bitmap. You need to
look at the 'middle of the output to see the raw data.

For completeness:-

0000 30 38 30 30 82 20 00 00 08 00 00 00 04 00 00 00 0800. ..........

^
bitmap starts |

0010 00 00 00 00 30 35 32 39 32 30 34 37 33 38 34 30 ....052920473840

^
bitmap ends |

Giving a bitmap of x'82200000080000000400000000000000' across 16 bytes.

The binary form of this hexadecimal value:-

1000 0010 0010 0000 0000 0000 0000 0000
0000 1000 0000 0000 0000 0000 0000 0000
0000 0100 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000

Number the bits from 1 to 128 from top left to bottom right and we have
the indicators for which fields are present.

(Bit 1 indicates that the second bitmap is present)

>
> Original Msg
>
> <isomsg>
> <field id="0" value="0800"/>
> <field id="7" value="0529204738"/>
> <field id="11" value="403568"/>
> <field id="37" value="914920403568"/>
> <field id="70" value="061"/>
> </isomsg>
>
> How should the values for field 1 and 2 be represented in the XML form
> above incase field 1 & 2 where to be dumped?

I don't understand what you are asking.

In XML form, you can just provide the fields, the bit map is not needed
as the field presence is implicit.

You could send the bitmap in character hexadecimal:-

<bitmap>82200000080000000400000000000000</bitmap>

But I am only guessing at what you want.


--
Mark

Reply all
Reply to author
Forward
0 new messages