May 07, 2018 - 06:17 AM
This ISO is about financial transactions being automated. I will explain the basics for any layman to interpret and even implement their own interface.
We will use the example of an ATM machine which has to communicate to the bank and eventually allow/deny the ATM user make some inquiries or perform some financial transactions.
We will refer to the ATM machine as TRANSMASTER, while the bank's software taking requests from the ATM, as ATM-BRIDGE.
Normally, the transmaster sends requests to the bridge. The bridge decodes the request to understand what the transmaster wants. Then the bridge gives some response to the transmaster.
A standard transmaster request entails 3 major parts i.e. Message Type Identifier (MTI), Bitmap field and the Data.
MTI-4 characters just before the start of the bitmaps. It denotes what type of message is contained and the expected function to be carried out on the message (simply; message class)
Bitmap is a collection of hexadecimal characters (16 xters in the message). You have to change this bitmap into binary format (Hexadecimal to Binary - Now, that's simple. Google it if you're not familiar with it.)
After you have obtained your binary format of the bitmap, each numeric in the binary format has some meaning. All zeros represent the absence of that field in the message. All 1s represent presence of that field in the message:
Example using balance inquiry:
0000925410387736189771000ATM0047 00020047 40nhif001>NAIROBI KE009AT01O222 KESKES05SACCO10RTPSID966605SACCO
Response from Bridge:
0000925410387736189771000ATM0047 00020047 40nhif001>NAIROBI KE009AT01O222 KESKES0600001KESD0000000371340002KESC0000002014200003KESD00000000000005SACCO10R
Breakdown of transmaster message:
1100 //message type identifier
E0340541AEE1A000 //bitmap 1
0000000C10000000 //bitmap 2
16429933267...... //message data
Google on how to know the start and end of a field in the message. Note that some fields have fixed length while others have variable length.
//HOW TO DECODE THE BITMAP TO BINARY, INSERT/REMOVE A FIELD THEN RECONSTRUCT THE NEW BITMAP
Design a simple table with 2 columns. 1 column contains a hexadecimal character while the other contains it's binary equivalent. See sample below:
temp+=getBinary(bitmap.Substring(i,1));//assumes you have a method for querying the DB and returning the equivalent binary to a given hexa.
You now have your binary representation. To inser/remove a field, count upto that field and toggle the value as1(insesrt) or 0 (remove).
Do the reverse to obtain your new bitmap.
That should be a good one for a start. Contact me for more info (email@example.com)