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 parsing Cobol fixed width message

Post new topic  Reply to topic
 DFDL parsing Cobol fixed width message « View previous topic :: View next topic » 
Author Message
Danny O
PostPosted: Tue Mar 19, 2013 1:47 am    Post subject: DFDL parsing Cobol fixed width message Reply with quote

Newbie

Joined: 19 Mar 2013
Posts: 2

Hi,
I'm using WMB 8.0.0.1 and I'm working on a flow to translate a Cobol fixed width message to XML. I have used the message model wizard to import the Cobol copybook into the toolkit and with a file input node I'm parsing this in using DFDL. However, when a pass a sample file through I get a parsing error:

Text:CHARACTER:CTDP3002E: Unexpected data found at offset '433' after parsing completed. Data: '0x1A...'.

The sample data is as follows:

1111112222222206400000000000000000000000016829XXXXXXXXXXXXXXXXXXYYYYYYYYYYYYYYYYYY 13028

It's not visible from the above but there is another character on the following line which is value 0x1a. I have been struggling with trying to set this value as a terminator in the DFDL message. Has anyone encountered this as an issue and coded around it?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Mar 19, 2013 1:53 am    Post subject: Reply with quote

Jedi Council

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

Don't use the debugger.

Take a user trace. The DFDL parser will show a lot more information this way. Then post it here so that experts such as Kimbert can help you understand what is going on.
_________________
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
kimbert
PostPosted: Tue Mar 19, 2013 2:10 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

That 0x1A is an end-of-file marker. You should set the terminator using the DFDL raw byte entity "%#r1A;" ( do not include the quote characters! )
which means 'a literal byte with the value 0x1A'.

You could also use a character entity such as %SUB; but I think that would be less reliable in this case because end-of-file markers seem to be used differently by different applications.

See this page in the DFDL specification for more details on DFDL entities: http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.dfdl.spec.doc/dfdl_12_2.html
Back to top
View user's profile Send private message
Danny O
PostPosted: Tue Mar 19, 2013 2:24 am    Post subject: Reply with quote

Newbie

Joined: 19 Mar 2013
Posts: 2

I had tried using sub already and that didn't work but with'%#r1a' the message does parse successfully. Many thanks for your help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DFDL parsing Cobol fixed width message
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.