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 IndexWebSphere Message Broker SupportUnable to Parse Message Model using DFDL

Post new topicReply to topic
Unable to Parse Message Model using DFDL View previous topic :: View next topic
Author Message
Janakiram
PostPosted: Thu May 09, 2019 4:14 am Post subject: Unable to Parse Message Model using DFDL Reply with quote

Newbie

Joined: 05 Oct 2005
Posts: 4

Hello Team,

I need help in parsing the file which of Fixed length format. I have created a DFDL model as per the structure while i trying to execute using message in DFDL editor i am getting below error

"error: CTDP3000E: Unexpected end of data at byte offset '13' while parsing element"

Below is my message model xsd

<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:ibmSchExtn="http://www.ibm.com/schema/extensions" xmlns:recFixLengthFieldsFmt="http://www.ibm.com/dfdl/RecordFixLengthFieldFormat">

<xsd:import namespace="http://www.ibm.com/dfdl/RecordFixLengthFieldFormat" schemaLocation="IBMdefined/RecordFixLengthFieldFormat.xsd"/>
<xsd:complexType name="Detail">
<xsd:sequence dfdl:terminator="%CR;%LF;">
<xsd:element dfdl:length="3" name="field1" type="xsd:string"/>
<xsd:element dfdl:length="2" name="field2" type="xsd:string"/>
<xsd:element dfdl:length="5" name="field3" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Record">
<xsd:sequence dfdl:initiatedContent="no" dfdl:separator="" dfdl:terminator="%CR;%LF;">
<xsd:element dfdl:length="10" dfdl:terminator="" name="Header" type="Header"/>
<xsd:element dfdl:length="10" name="Detail" type="Detail"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Header">
<xsd:sequence dfdl:terminator="">
<xsd:element dfdl:length="3" name="field1" type="xsd:string"/>
<xsd:element dfdl:length="2" name="field2" type="xsd:string"/>
<xsd:element dfdl:length="5" dfdl:terminator="" name="field3" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:annotation>
<xsd:appinfo source="http://www.ogf.org/dfdl/">
<dfdl:format documentFinalTerminatorCanBeMissing="yes" encoding="{$dfdl:encoding}" escapeSchemeRef="" occursCountKind="fixed" ref="recFixLengthFieldsFmt:RecordFixLengthFieldsFormat"/>
</xsd:appinfo>
</xsd:annotation>

<xsd:element dfdl:lengthKind="delimited" dfdl:terminator="" ibmSchExtn:docRoot="true" name="TestFixedLengthDFDL">
<xsd:complexType>
<xsd:sequence dfdl:separator="" dfdl:sequenceKind="ordered" dfdl:terminator="%CR;%LF;">
<xsd:element dfdl:length="10" dfdl:lengthKind="explicit" dfdl:occursCountKind="implicit" dfdl:terminator="" maxOccurs="unbounded" name="Record" type="Record"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>


</xsd:schema>

Here is my sample message

12345janak
56789janak

Thanks in advance for all your help and support on this.

Looking forward for your response.

Thanks and Regards,
Janakiram.
Back to top
View user's profile Send private message Send e-mail
timber
PostPosted: Thu May 09, 2019 5:32 am Post subject: Reply with quote

Guardian

Joined: 25 Aug 2015
Posts: 960

Happy to help, but can I ask for two things:
- Please put code and xsd data into [code] tags. It is much more readable that way.
- Please post again, and supply the output of the DFDL Trace view (just the interesting parts please - I don't have time to crawl through the entire trace)

When you look at the DFDL Trace you may find the problem immediately. It is very difficult to debug a DFDL model without using the DFDL Trace.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportUnable to Parse Message Model using DFDL
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.