Register  |  Login




Advertisement

Start Your Own Q&A Site

Create your own Q&A site easily, allowing you to quickly grow a new community around any subject matter or generate new organic traffic for your existing website.

Question

Status: Closed Points: 250 Time: 17:41 - Oct 17, 2006  

jirimail

How can I create ISO 8583 Primary Bitmap ?

Hi ,
I am developing an application that send/receive message in ISO 8583 format. In the message format there is one primary bitmat field. Can anybody help me in this matter
How can I create ISO 8583 Primary Bitmap ?

Thanks

Categories

Answer Discussion
Tutorials

 

dustPuppy

Date:: Oct 18, 2006

Time:: 16:02

Hi jirimail,

Could you explain a bit more what your problem is?
Is it the ISO 8583 format that you don't understand, or is it the specific programming environment you're using, that you need help creating the bitmap? Which language are you programming in?

dustPuppy

Date:: Oct 18, 2006

Time:: 16:03

did you check the description here of ISO 8583: http://en.wikipedia.org/wiki/ISO_8583#Bi...

jirimail

Date:: Oct 20, 2006

Time:: 13:41

Hi,
I'm developping an Financial application that must send ISO8583 Message to remote Financial Server using C#, till now i can send the network message 1804 with fields (1,7,11,12,24,37,53,93,94), but when i check the log file of th remote server, it goes to parse other fields like (3,4,5,15, etc), and this because of the bitmaps.

a bitmap is an indicator of presence of fields, an ISO8583 message can have at least 1 bitmap. the first one indicates presence of ths first 64 fields, and the second indicates the presence of the last 64 fields.

for example the network ISO8583 Message 1804 must have the following fields (1,7,11,12,24,37,53,93,94) so the bitmaps will be :
Bitmap 1: 1000001000110000000000010000000000001000000000000000000000000000
Bitmap 2: 0000000000000000000000000000110000000000000000000000000000000000

Hexadecimal format
Bitmap 1 :8230010008000800
Bitmap 2 :0000000C00000000

in wikipedia.org, i understand that the bitmaps must be Empacted into 8bits (binary).
How can i Empact the bitmaps??

Thank you

shihab

Date:: May 20, 2007

Time:: 01:45

Hi jirimail,

Have you understood the bitmap format??

admin

Date:: Jun 25, 2007

Time:: 05:46

jirimail, please close this question and distribute the points.
If you didn't get a solution to your problem or you found it yourself, please leave a comment here to let the experts know.
Thanks,
Quomon Admin

admin

Date:: Jul 02, 2007

Time:: 09:37

The question has been closed.

Quomon Admin

joxley

Date:: Jul 17, 2007

Time:: 02:45

Okay, I'm going to assume you have a 64 field bitmap which will compress to 8 bytes. The problem I had was using strings in C#. When I moved over to using a byte array, everything worked great. I'm doing it using strings in C#:
// Here is the bitmap, so the encoded bitmap will be 8 bytes
string bits="1000001000110000000000010000000000001000000000000000000000000000&quo
t;;
int bitmapLength=8;

byte[] bitmapArray = new byte[8];
// Work this maths however you want
for(int i=0; i<bitmapLength; i++){
string thisByte = bits.Substring(i*8, 8); // get one byte out of your string of bits
byte b = Convert.ToByte(thisByte, 2); // RTFM, but basically convert it from binary to a byte
bitmapArray[i] = b; // Assign it to the bitmap array
}

I am pretty sure your problem was coming in with the conversion to whatever encoding your system uses.

Hope this helps

John

Question Answered

This question has been closed, and points have been rewarded to the following experts:


dustPuppy: 50
jirimail: 200

You're welcome however to comment or give additional information or if you wish, you have the ability to write a Tutorial in the Tutorial Area.

Answer this Question

New User

Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:

Forgot Your Password?

joxley

Date:: Jul 17, 2007

Time:: 06:22

Your problem is probably from dealing with a string rather than a byte array, and the bitmap being scrambled by your encoding before it hits the network. Here is my C# Pack method:

public byte[] Pack()
{
int len = Length; // Get the length of the bitmap
len /= 8; // The length of the encoded bitmap
byte[] data = new byte[len]; // create a byte array
string bits = ToString(); // Get a "011010001001" representation of the bitmap
for (int i = 0; i < len; i++)
{
string thisByte = bits.Substring(i * 8, 8); // 8 bits = 1 byte
byte b = Convert.ToByte(thisByte, 2); // Convert it to a byte
data[i] = b; // assign to the byte array
}
return data;
}

I hope this helps


Click here to see the Answer Discussion that preceded this tutorial.


Login to rate this tutorial: Good  |  Bad

anilthomasc

Date:: Jan 13, 2009

Time:: 19:32

http://en.wikipedia.org/wiki/ISO_8583

It’s easy to do. HEre is an example.
- Find the request/response message format and identify the primary and secondary segments needed for this message.
- Mark a 1 for each primary segment required in the request and a 0 for each primary segment absent in the request. Segments starting at P1 through P64.
- In this example, we need P1, P3 , P4 , P7 ,P11 ,P12, P13 ,P37 ,P41 ,P48 ,P60.
- When you mark zero’s and Ones, it will be 1011001000111000000000000000000000001000100000010000000000010000 .
- Now group it by 4 when it will be like
1011 0010 0011 1000 0000 0000 0000 0000 0000 1000 1000 0001 0000 0000 0001 0000 .
- Get the Hex value of each of the 4 groups.
1011 = B
0010 = 2
0011 = 3
1000 = 8
and so on
- Now put them all together to get the primary bitmap B238000008810010


Click here to see the Answer Discussion that preceded this tutorial.


Login to rate this tutorial: Good  |  Bad

Answer this Question

New User

Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:

Forgot Your Password?

Ask a Question

Have a new question? Ask!

You have 100 characters to use



Top Experts

View More

Rank

Expert

Points

1.

nidhi

10354

2.

oracleofDelphi

6493

3.

rcastagna

5596

4.

LAGM

4848

5.

PeterNZ

3487

6.

gonzalo

2840

7.

Mason

2770

8.

jgivoni

2303

9.

xarcus

1820

10.

Anpanman

917

Become an Expert

Register today to share your knowledge with the community and be recognized and rewarded for your contributions.


Register Here




"Psst, Quomon is a great site. Pass it on."     Tell a Friend  |   Link To Us  |   Save to Delicious  |   Digg! Digg it



Language Options

English:

www.quomon.com

Español:

www.quomon.es