Parsing ISO 8583:1993 with j8583

6.4k views Asked by At

I am using j8583 Java library to generate and read ISO 8583:1987 messages and it is working perfect.

Now I want to generate and read ISO 8583:1993 messages. Can I do it with making some tweaks in the same code or do I need to use some new library to achieve it?

Thanks.

1

There are 1 answers

1
Arpit Aggarwal On BEST ANSWER

You can achieve the same making some changes in your creating and parsing guide for your ISO Messages. As messages of ISO 8583:1987 version starts with 0xxx and messages of ISO 8583:1993 version starts with 1xxx.

For example,

While working with ISO 8583:1987 you create message with <template type="0200"> as below:

<template type="0200">
    <field num="3" type="NUMERIC" length="6">650000</field>
    <field num="32" type="LLVAR">456</field>
    <field num="35" type="LLVAR">4591700012340000=</field>
    <field num="43" type="ALPHA" length="40">Fixed-width data</field>
    <field num="48" type="LLLVAR">Life, the Universe, and Everything|42</field>
    <field num="49" type="ALPHA" length="3">840</field>
    <field num="60" type="LLLVAR">B456PRO1+000</field>
    <field num="61" type="LLLVAR">This field can have a value up to 999 characters long.</field>
    <field num="100" type="LLVAR">999</field>
    <field num="102" type="LLVAR">ABCD</field>
</template>

And when you are working with ISO 8583:1993 you have to create message with <template type="1200"> as below:

<template type="1200">
    <field num="3" type="NUMERIC" length="6">650000</field>
    <field num="32" type="LLVAR">456</field>
    <field num="35" type="LLVAR">4591700012340000=</field>
    <field num="43" type="ALPHA" length="40">Fixed-width data</field>
    <field num="48" type="LLLVAR">Life, the Universe, and Everything|42</field>
    <field num="49" type="ALPHA" length="3">840</field>
    <field num="60" type="LLLVAR">B456PRO1+000</field>
    <field num="61" type="LLLVAR">This field can have a value up to 999 characters long.</field>
    <field num="100" type="LLVAR">999</field>
    <field num="102" type="LLVAR">ABCD</field>
</template>

Similarly, while parsing the ISO 8583:1993 you have to change the <parse type="0210"> to <parse type="1210"> as below:

<parse type="1210">
    <field num="3" type="NUMERIC" length="6" />
    <field num="4" type="AMOUNT" />
    <field num="7" type="DATE10" />
    <field num="11" type="NUMERIC" length="6" />
    <field num="12" type="TIME" />
    <field num="13" type="DATE4" />
    <field num="15" type="DATE4" />
    <field num="17" type="DATE_EXP" />
    <field num="32" type="LLVAR" />
    <field num="35" type="LLVAR" />
    <field num="37" type="NUMERIC" length="12" />
    <field num="38" type="NUMERIC" length="6" />
    <field num="39" type="NUMERIC" length="2" />
    <field num="41" type="ALPHA" length="16" />
    <field num="43" type="ALPHA" length="40" />
    <field num="48" type="LLLVAR" />
    <field num="49" type="ALPHA" length="3" />
    <field num="60" type="LLLVAR" />
    <field num="61" type="LLLVAR" />
    <field num="70" type="ALPHA" length="3" />
    <field num="100" type="LLVAR" />
    <field num="102" type="LLVAR" />
    <field num="126" type="LLLVAR" />
</parse>