Posted: Thu May 10, 2018 3:04 pm Post subject: DFDL Parsing issue
Apprentice
Joined: 22 Jan 2013 Posts: 26
I am creating new DFDL model from scratch and facing below issue.
I have a incoming field with 2 bytes field length in prefix(prefix length not inc. in field) in hex form.
For example:
Incoming Field is : 0BF4F3F04040404040404040
Prefix length = 0B (Hex format, is equal to decimal -11)
On the input node the parser is selected as BLOB.
So after Input node the same field is represented as HEX(ASCII form)
304246344633463034303430343034303430343034303430
Prefix length = 3042(0B)
Next, in compute node I am doing conversion of this field to original hex form -3042F4F3F04040404040404040 leaving the prefix length as is i.e 3042.
Later using DFDL model, I can successfully parse this prefix length field using number representation (number base 16) and also the field as string with encoding as ebcdic so output is '430 '
Here comes the issue..when the output from last step is again assigned to blob (using ASBITSTREAM ) what I see is 3062f4f3f04040404040404040
Prefix length is getting changed to 3062 ... I understand its because of ASCII character 'b' instead of 'B'.
How to handle this? how to achieve correct BLOB value for prefix which is '3042'?
how to achieve correct BLOB value for prefix which is '3042'?
I think both are 'correct' but I assume that the downstream application only handles 'B' and not 'b'. You will probably have to post-process the DFDL BLOB to achieve what you need.
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