ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DFDL parser- String fields has Space or low-Value

Post new topic  Reply to topic Goto page Previous  1, 2
 DFDL parser- String fields has Space or low-Value « View previous topic :: View next topic » 
Author Message
agrawalamit166
PostPosted: Tue Sep 13, 2016 12:31 pm    Post subject: Reply with quote

Voyager

Joined: 17 Aug 2009
Posts: 78
Location: NY, US

sorry, my mistake... Here is hex data:
Code:
45 46 34 39 30 4c 4f 47 20 2d 20 49 6e 76 61 6c 69 64 20 41 63 74 69 6f 6e 3a 20 2a 52 45 56 4f 4b 45 2a 20 4d 75 73 74 20 62 65 20 53 45 54 55 50 2c 20 41 55 54 48 2c 20 4f 52 20 53 45 54 50 52 54 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
Back to top
View user's profile Send private message Yahoo Messenger
timber
PostPosted: Tue Sep 13, 2016 1:31 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

Thanks - but that's the entire message. We are only interested in the bytes that relate to the field that you are struggling with. It's all there in the DFDL Test perspective if you look carefully.
Back to top
View user's profile Send private message
agrawalamit166
PostPosted: Tue Sep 13, 2016 1:52 pm    Post subject: Reply with quote

Voyager

Joined: 17 Aug 2009
Posts: 78
Location: NY, US

you are right.. here is the one field data (200 characters). where I am getting issue:
first 67 characters - Actual response
next 13 characters - nul character
next 120 characters - space

Code:
45 46 34 39 30 4c 4f 47 20 2d 20 49 6e 76 61 6c 69 64 20 41 63 74 69 6f 6e 3a 20 2a 52 45 56 4f 4b 45 2a 20 4d 75 73 74 20 62 65 20 53 45 54 55 50 2c 20 41 55 54 48 2c 20 4f 52 20 53 45 54 50 52 54 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
Back to top
View user's profile Send private message Yahoo Messenger
timber
PostPosted: Tue Sep 13, 2016 2:29 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

So the sender is padding the field with a mixture of low-values and spaces. That's not a nice thing to do. To be fair to the sender, the problem may have started further back up the chain.
Either way, this is no longer a DFDL modelling problem. It is a message flow design problem. You cannot send those low-values in an XML message because XML does not allow it even if you wrap the data in CDATA tags. Your message flow must either trim off any trailing null characters from this field value (and any other field values that might be contain nulls) or else it must TRANSLATE the null values to spaces. Your choice (or maybe your architect's choice).
Back to top
View user's profile Send private message
agrawalamit166
PostPosted: Tue Sep 13, 2016 3:52 pm    Post subject: Reply with quote

Voyager

Joined: 17 Aug 2009
Posts: 78
Location: NY, US

Thanks Timber,

You are absolutely right. We should not get mix element Nul with Spaces.
We figured out the problem, it's from mainframe side; they were copying data from 80 char field to 200 char field. Now they initialize the 80 char field to space before copying data, which fixes our problem.
Back to top
View user's profile Send private message Yahoo Messenger
smdavies99
PostPosted: Tue Sep 13, 2016 10:20 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Well done!

In cases like this looking at the original data is always a good move. Now you have seen it for yourself, you won't be surprised by it in future when you get stumped.

I won't be alone in saying that the number of times the more experienced of us have seen this ourselves is HUGE.

Garbage In - Garbage Out strikes again.

I'm glad that you were able to get the Mainframe error corrected. This is not always the case.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
timber
PostPosted: Tue Sep 13, 2016 11:57 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

Quote:
Now they initialize the 80 char field to space before copying data, which fixes our problem.
That's a great result.
If I were in your shoes, I would ask the mainframe team to check whether any other fields need the same treatment.
Back to top
View user's profile Send private message
shanson
PostPosted: Wed Sep 14, 2016 12:12 am    Post subject: Reply with quote

Partisan

Joined: 17 Oct 2003
Posts: 344
Location: IBM Hursley

Quote:
I think we now have all the facts.
- You have some fields that, when nil, are entirely filled with low-values. You should model those with nilKind='literalCharacter' and nilValue='%#r00'
- You have some fields that, when nil, are entirely filled with spaces. You should model those with nilKind='literalCharacter' and nilValue='%SP;'
- You have some fields that, when nil, contain one or more low-valued bytes followed by spaces for padding. You should model those with nilKind='literalvalue' nilValue='%#r00' textStringPadCharacter="%SP;"


I think this needs one adjustment.

I think we now have all the facts.
- You have some fields that, when nil, are entirely filled with low-values. You should model those with nilKind='literalCharacter' and nilValue='%#r00;'
- You have some fields that, when nil, are entirely filled with spaces. You should model those with nilKind='literalCharacter' and nilValue='%SP;'
- You have some fields that, when nil, contain exactly one low-valued byte followed by spaces for padding. You should model those with nilKind='literalvalue' nilValue='%#r00;' textStringPadCharacter="%SP;"

If you need to handle two low-valued bytes followed by padding then you need nilValue='%#r00;%#r00;'. Ando so on.

If you want to set this up so it handles any number of low-valued bytes followed by padding then you need nilValue='%#r00; %#r00;%#r00; %#r00;%#r00;%#r00;' etc - a space-separated list - you get the idea. This will degrade performance though.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Sep 14, 2016 2:45 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

shanson wrote:
Quote:
I think we now have all the facts.
- You have some fields that, when nil, are entirely filled with low-values. You should model those with nilKind='literalCharacter' and nilValue='%#r00'
- You have some fields that, when nil, are entirely filled with spaces. You should model those with nilKind='literalCharacter' and nilValue='%SP;'
- You have some fields that, when nil, contain one or more low-valued bytes followed by spaces for padding. You should model those with nilKind='literalvalue' nilValue='%#r00' textStringPadCharacter="%SP;"


I think this needs one adjustment.

I think we now have all the facts.
- You have some fields that, when nil, are entirely filled with low-values. You should model those with nilKind='literalCharacter' and nilValue='%#r00;'
- You have some fields that, when nil, are entirely filled with spaces. You should model those with nilKind='literalCharacter' and nilValue='%SP;'
- You have some fields that, when nil, contain exactly one low-valued byte followed by spaces for padding. You should model those with nilKind='literalvalue' nilValue='%#r00;' textStringPadCharacter="%SP;"

If you need to handle two low-valued bytes followed by padding then you need nilValue='%#r00;%#r00;'. Ando so on.

If you want to set this up so it handles any number of low-valued bytes followed by padding then you need nilValue='%#r00; %#r00;%#r00; %#r00;%#r00;%#r00;' etc - a space-separated list - you get the idea. This will degrade performance though.


On a hunch I'd say that the low values are some COBOL initialization of the field, and the space values are the overall initialization... Ideally this should then be taken care of with defining the individual initialization / null value of the fields.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DFDL parser- String fields has Space or low-Value
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.