Binary representation of the bitmap field

690 views
Skip to first unread message

Fernando Del Carmen Taveras

unread,
Sep 30, 2009, 7:06:46 AM9/30/09
to jpos-...@googlegroups.com
In implementation we need  the iso8583 message be packet
with  the Binary representation of  the bitmap field,
something like the following with a lengh of 64:
 
bitmap: 0011000000100000010001011000000000100000110000001000000000001100
only the bitmap    field        
 
For this message :

          ISOMsg message = new ISOMsg();
            message.setMTI("0200");
            message.set("3", "003000");
            message.set("4", "000000000800");
            message.set("11", "000007");
            message.set("18", "5411");
            message.set("22", "0022");
            message.set("24", "0006");
            message.set("25", "00");
            message.set("35", "05000505200141213d07025010000040000000");
            message.set("41", "0443740");
            message.set("42", "56000000000");
            message.set("49", "0840");
            message.set("61", "1XX        XXX");
            message.set("62", "000000");
            GenericPackager packager = new GenericPackager("C:/jpos6dev/build/cfg/packager/base24.xml");
            message.setPackager(packager);
            System.out.println("Mensaje Empaquetado->"+new String(message.pack()));
             i get the bitmap   320458020C0800C, the message is packet
             correctly  according with the definition     
 <isofield
        id="1"
        length="16"
        name="BIT MAP"
        class="org.jpos.iso.IFA_BITMAP"
 />
 
 
I now changed this field definition  to be :
<isofield
 id="1"   
length="64"     
 name="BIT MAP"     
class="org.jpos.iso.IFB_BINARY"/>
in order to be according with the  Message Packet Specifications of the  host,
but now  i receive and error message
error org.jpos.iso.IFB_BYNARY : problem packing field -1

how can i manage this issue:
Thanks for your help



¡Obtén la mejor experiencia en la web!
Descarga gratis el nuevo Internet Explorer 8
http://downloads.yahoo.com/ieak8/?l=e1

AAO

unread,
Sep 30, 2009, 8:03:38 AM9/30/09
to jpos-...@googlegroups.com
Are you sure about that?  That would be most unusual.  They don't want the BCD representation of the bitmap?

I pulled up a representation industry spec and it says of the Bitmap:

Bit Map, Primary b 64

But, then further on in this spec (which is typical), you see how they actually want you to send the data; in this example, you have two options:

b 8 bytes (if BCD option) or
16 hex bytes (if display option)

The first option is implemented by IFB_BITMAP

The second option is implemented by either IFA_BITMAP or IFE_BITMAP. 

In all cases the packager length you define is 16.  jPOS figures out the rest.

See also:

http://www.andyorrock.com/2007/08/iso8583-seconda.html

(Note that DE 1 is, in reality, the definition for the Secondary bitmap...but jPOS sees it as a nod to the primary, so those two are in lock-step).

Andy Orrock

Fernando Del Carmen Taveras

unread,
Oct 1, 2009, 8:29:13 AM10/1/09
to jpos-...@googlegroups.com
Ok. thanks
 
In jpos, if i have the following :
 
ISOMsg message = new ISOMsg();
message.setMTI("200");
message.set("2", "1518674684515231321");
message.set("3", "140000");
message.set("4", "000000100000");
message.set("7", "1219171316");
message.set("11", "058169");
message.set("12", "111316");
message.set("13", "1254");
message.set("14", "0901");
message.set("17", "3566");
message.set("22", "010");
message.set("32", "062890000");
message.set("37", "1565646656");
message.set("41", "MJDCAJ02        ");
message.set("42", "CUSCATLAN       ");
message.set("43", "CUSCATLAN                DF      MX");
message.set("48", "044030517                                      ");
message.set("49", "558");
message.set("55", "003818");
message.set("60", "0120720BCRT+000");
message.set("61", "0130000PRO10000P");
message.set("62", "006008564");
message.set("100", "06288000");
message.set("120", "033MOREL -CAJA-                  ");
GenericPackager packager = new GenericPackager("src/packager/base24.xml");

message.setPackager(packager);
System.out.println("Mensaje Empaquetado->"+new String(message.pack()));
 
i get the packet message :
        -------bitmap1---------- ----------bitmap2---------
0200F23C840108E1821C00000000100001001915186746845152313211400000000001000001219171316058169111316125409013566010090628900001565646656 MJDCAJ02 CUSCTLAN CUSCTLAN DF MX 047044030517 640806288000033033MOREL -CAJA-
 
this is correct.
 
the binary representation of  the exage. bitmaps is as follow :
 
F23C840108E1821C       =    011000000100110010001011000000000100000110000001000000000001100 (example, not real)
000000001000010019    =     0011000000100000010001011000000000100000110011001000000000000000 (example, no real)
 
 
 
i need to now i can do this with jpos changing the packager definition
so the packet message result be  something like:
 
020000110000001001100100010110000000001000001100000010000000000011000011000000100000010001011000000000100000110011001000000000000000
15186746845152313211400000000001000001219171316058169111316125409013566010090628900001565646656 MJDCAJ02 CUSCTLAN CUSCTLAN DF MX 047044030517 5580060038180150120720BCRT+0000160130000PRO10000P0090060085640806288000033033MOREL -CAJA-
 
the remote host, not jpos based, will recognize
00110000001001100100010110000000001000001100000010000000000011000011000000100000010001011000000000100000110011001000000000000000
as a valid bitmap 
 not  F23C840108E1821C000000001000010019
 
I will appreciate other recommendations or ideas for handling this matter in jpos.
 
thanks !
 
 

--- El mié 30-sep-09, AAO <aaor...@gmail.com> escribió:

AAO

unread,
Oct 1, 2009, 9:22:15 AM10/1/09
to jpos-...@googlegroups.com
Got it.  That's beyond my pay grade.

BTW, where you say you want a "the binary representation" of this...what you're actually asking for is a character-representation of the binary list of settings.  And do you need ASCII or EBCDIC?

Andy

Alejandro Revilla

unread,
Oct 1, 2009, 9:25:42 AM10/1/09
to jpos-...@googlegroups.com
Are you sure you want every bit represented using a byte (either in ASCII 0x30/0x31 or EBCDIC 0xF0/0xF1) ?

I think you are confusing the wire protocol (the real bytes going over the wire) with a display-time format provided by your endpoint.

If you want the former, you need to create your own BitmapPackager.

Fernando Del Carmen Taveras

unread,
Oct 1, 2009, 9:47:56 AM10/1/09
to jpos-...@googlegroups.com

The bitmap would be represented with the binary representation of the  of the ASCII character.

 
 

--- El jue 1-oct-09, AAO <aaor...@gmail.com> escribió:

Alejandro Revilla

unread,
Oct 1, 2009, 9:59:11 AM10/1/09
to jpos-...@googlegroups.com
To clarify: one byte per bit? (that would be really weird)

ROBERTO DE LA ROSA TORRES

unread,
Mar 1, 2017, 6:19:28 PM3/1/17
to jPOS Users
Hola Fernando pusiste resolver tu problema?

Victor Salaman

unread,
Mar 1, 2017, 9:04:03 PM3/1/17
to jpos-...@googlegroups.com
Be aware that so far you are winning,  trying to wake up an 8 year old thread! Bravo :)

/V

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+unsubscribe@googlegroups.com.
To post to this group, send email to jpos-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/b8a97a7d-bf44-4540-b7f3-75ecfd7ca50d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages