ASCII code 20 = DC4 = Device Control 4?

1,209 views
Skip to first unread message

JayPoser

unread,
Jan 10, 2008, 10:04:46 PM1/10/08
to jPOS Users
I've prototyping my ISO messages to make sure my output looks like
what the samples show in the switch spec.
Using ASCII encoded fields, other than the bitmap, I get almost
everything right, except the ending.

What I'm able to get with Bash scripts through the server simulator is
missing a DC4 char at the end, which means that my output is shorter
and missing the characters '20' at the end.

Sample '0800' message: 3038 3030 8222 0000 0000 0000 0400 0001 0000
0000 3130 3138 3132 3138 3233 3030 3030 3239 3130 3138 3030 3133 3435
3637 2020 2020

My '0800' message: 3038 3030 8222 0000 0000 0000 0400 0001 0000 0000
3130 3138 3132 3138 3233 3030 3030 3239 3130 3138 3030 3133 3435 3637
2020 20

Sample '0810' message: 3038 3130 8220 0000 0200 0000 0400 0000 0000
0000 3130 3138 3132 3138 3233 3030 3030 3330 3030 3130 3120
My '0810' message: 3038 3130 8220 0000 0200 0000 0400 0000 0000 0000
3130 3138 3132 3138 3233 3030 3030 3330 3030 3130 31

What controls this DC4 value? The socket connection/implementation?
Is it perhaps something about my packager mappings?

Thanks,
Karoy

Alejandro Revilla

unread,
Jan 11, 2008, 8:14:32 AM1/11/08
to jpos-...@googlegroups.com
>
> What I'm able to get with Bash scripts through the server simulator is
> missing a DC4 char at the end, which means that my output is shorter
> and missing the characters '20' at the end.
>
You are probably confusing ASCII with HEX; 20 hex is a space while 20
ascii is a DC4. Your message seems to lack a few spaces somewhere
(probably a misconfigured field length).


JayPoser

unread,
Jan 11, 2008, 1:10:29 PM1/11/08
to jPOS Users
Right, so here are field definitions that are in play in this test 800
msg, manually edited from the debug output and the mapping XML:
<field id="0" ength="4" pad="true" class="org.jpos.iso.IFA_NUMERIC"
value="0800"/>
<field id="7" length="10" pad="true" class="org.jpos.iso.IFA_NUMERIC"
value="1018121823"/>
<field id="11" length="6" pad="true" class="org.jpos.iso.IFA_NUMERIC"
value="000029"/>
<field id="15" length="4" pad="true" class="org.jpos.iso.IFA_NUMERIC"
value="1018"/>
<field id="70" length="3" pad="false" class="org.jpos.iso.IFA_NUMERIC"
value="001"/>
<field id="96" length="8" pad="false" class="org.jpos.iso.IF_CHAR"
value="34567"/>

Since field-96 is the last one in the list, I am suspecting it is the
culprit (at least to my simplistic understanding).
I've played with its padding settings and packager definition, but
nothing seems to help.

Andy Orrock

unread,
Jan 11, 2008, 1:58:02 PM1/11/08
to jpos-...@googlegroups.com
Maybe I'm missing something, but earlier you compared your sample (which I
suppose is your goal) to your output:

Sample '0800' message:
3038 3030 8222 0000 0000 0000 0400 0001 0000 0000 3130 3138 3132 3138 3233
3030 3030 3239 3130 3138 3030 3133 3435 3637 2020 2020

My '0800' message:
3038 3030 8222 0000 0000 0000 0400 0001 0000 0000 3130 3138 3132 3138 3233
3030 3030 3239 3130 3138 3030 3133 3435 3637 2020 20

I think your complaint is that you're one byte short. Umm...you do see that
the packager has constructed the message exactly as you've asked? Your 96
is eight bytes, as you've requested. The sample's 96 is nine bytes.

Maybe I've misunderstood your question.

JayPoser

unread,
Jan 11, 2008, 3:01:36 PM1/11/08
to jPOS Users
As always, you've got it right. The spec says that s-96 is 'an-8', yet
the sample data shows 9 bytes.
I didn't do an actual byte count up until now. Thanks again Andy!
Reply all
Reply to author
Forward
0 new messages