EBCDIC sub fields packing and unpacking

231 views
Skip to first unread message

Jo

unread,
Feb 18, 2018, 4:26:25 PM2/18/18
to jPOS Users
I am trying to test my configuration and see weird characters after unpacking a packed message. Could someone help understand what is happening.

I have configured packager as below,

        <isofieldpackager
id="10"
name="10"
length="20"
class="org.jpos.iso.IFE_NUMERIC"
pad="false"
packager="org.jpos.iso.packager.GenericSubFieldPackager"
emitBitmap="false">
<isofield
id="1"
name="10.1"
length="4"
class="org.jpos.iso.IFE_NUMERIC"
pad="false"/>
<isofield
id="2"
name="10.2"
length="6"
class="org.jpos.iso.IFE_NUMERIC"
pad="false"/>
<isofield
id="3"
name="10.3"
length="10"
class="org.jpos.iso.IFE_NUMERIC"
pad="false"/>
</isofieldpackager>

My test code,

        packIsoMsg.set("10.1", "0100");
        packIsoMsg.set("10.2", "112233");
        packIsoMsg.set("10.3", "0218112233");

When i pack and print

  <isomsg id="10">
    <field id="1" value="0100"/>
    <field id="2" value="112233"/>
    <field id="3" value="0218112233"/>
  </isomsg>

When i unpack and print

  <isomsg id="10">
    <!-- org.jpos.iso.packager.GenericSubFieldPackager -->
    <field id="1" value="C¬C£"/>
    <field id="2" value="C¬C¬C£"/>
    <field id="3" value="C£C¥C¥C·C·"/>
  </isomsg>

unpackIsoMsg.getString("10.1") => "C¬C£"

Barzilai Spinak

unread,
Feb 18, 2018, 11:19:59 PM2/18/18
to jpos-...@googlegroups.com
What is the input data that you are unpacking?

> unpackIsoMsg.getString("10.1") => "C¬C£"
> --

--
Barzilai Spinak
Transactility, Inc.
www.transactility.com
"Commercial licensing and support for the jPOS.org project"

chhil

unread,
Feb 19, 2018, 12:22:38 AM2/19/18
to jpos-...@googlegroups.com
After packing save the packed byte array and  do a sysout of ISOUtil.hexdump(packed byte array).

Use the packed byte array and do an ISOmsg unpack on it (assuming you have set the correct packager on the ISOMsg).

After packing you can do a ISOMsg.dump(System.out, "");

Show us the result of the the operations.

-chhil





--
--
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/e6593b97-b1d5-f6ce-6329-3fb89255f4c8%40transactility.com.
For more options, visit https://groups.google.com/d/optout.

Владимир Котович

unread,
Apr 6, 2018, 10:20:05 AM4/6/18
to jPOS Users
Try to use IFA_NUMERIC packager for each subfield. Field 10 has already been unpacked into ASCII by IFE_NUMERIC isofieldpackager/

понедельник, 19 февраля 2018 г., 0:26:25 UTC+3 пользователь Jo написал:

Alejandro Revilla

unread,
Apr 6, 2018, 11:55:15 AM4/6/18
to jPOS Users
When you use inner fields, your outer packager has to be a binary one, in your case, replace the first IFE_NUMERIC with IFB_BINARY and you'd be all set.



Reply all
Reply to author
Forward
0 new messages