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 - \r Issue

Post new topic  Reply to topic Goto page Previous  1, 2, 3  Next
 DFDL Parsing - \r Issue « View previous topic :: View next topic » 
Author Message
Cubersome
PostPosted: Wed Feb 18, 2015 8:00 am    Post subject: Reply with quote

Apprentice

Joined: 02 Mar 2012
Posts: 37

Hi Kimbert,

I am trying to create DFDL parser for the below scenario:

HeaderRecord
Detail Record
Detail Record
Detail Record
..........
..........
..........
TrailerRecord

Each record will be identified by the value in the 2nd column. Suppose Header record 2nd column will have "H", Detail record 2nd column will have"D" and the trailer record 2nd column will have "T".
Because there is no initiator at the begin of each record to identify that record. Is there a way to create the DFDL parser for the above scenario?
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Feb 18, 2015 8:05 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Cubersome wrote:
Each record will be identified by the value in the 2nd column. Suppose Header record 2nd column will have "H", Detail record 2nd column will have"D" and the trailer record 2nd column will have "T".
Because there is no initiator at the begin of each record to identify that record. Is there a way to create the DFDL parser for the above scenario?


a) This sounds like a different problem and should really be a new thread.

b) If there's no initiator at the begining of each record, what purpose does the "H", "D" and "T" serve if not to identify the record type? If you want the question asked a different way, if the record type is the 2nd column, what's the 1st column and how do you know where the columns end?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Cubersome
PostPosted: Wed Feb 18, 2015 8:53 am    Post subject: Reply with quote

Apprentice

Joined: 02 Mar 2012
Posts: 37

Hi Vitor,
I am sorry for not opening a new thread...

b) The second column is for the record identifier. First column is a sequence number of length 6. 2nd column is length 1.("H","D","T")
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Feb 18, 2015 9:31 am    Post subject: Reply with quote

Grand High Poobah

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

Make the second column a discriminator...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Wed Feb 18, 2015 9:32 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Cubersome wrote:
I am sorry for not opening a new thread...


It's a judgement call, but this really doesn't sound like the same problem.

Cubersome wrote:
b) The second column is for the record identifier. First column is a sequence number of length 6. 2nd column is length 1.("H","D","T")


And again I ask why you can't use it as an initiator.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Feb 18, 2015 9:40 am    Post subject: Reply with quote

Grand High Poobah

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

Vitor wrote:
Cubersome wrote:
I am sorry for not opening a new thread...


It's a judgement call, but this really doesn't sound like the same problem.

Cubersome wrote:
b) The second column is for the record identifier. First column is a sequence number of length 6. 2nd column is length 1.("H","D","T")


And again I ask why you can't use it as an initiator.

You could use it as a field initiator but not as a record initiator (not the first field on the record)...
But you can use it as a record discriminator...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Cubersome
PostPosted: Wed Feb 18, 2015 10:35 am    Post subject: Reply with quote

Apprentice

Joined: 02 Mar 2012
Posts: 37

Hi,

I added the 2nd Column as discriminator for the Detail Record and still it is not working.
Following is the DFDL I created.

Code:
<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" xmlns:fmt="http://www.ibm.com/dfdl/GeneralPurposeFormat" xmlns:ibmDfdlExtn="http://www.ibm.com/dfdl/extensions" xmlns:ibmSchExtn="http://www.ibm.com/schema/extensions" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <xsd:import namespace="http://www.ibm.com/dfdl/GeneralPurposeFormat" schemaLocation="IBMdefined/GeneralPurposeFormat.xsd"/>
                                        <xsd:complexType name="TrailRecord">
    <xsd:sequence>
      <xsd:element dfdl:length="6" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="sequenceNumber" type="xsd:string"/>
      <xsd:element dfdl:length="1" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="recordIdentifier" type="xsd:string"/>
      <xsd:element dfdl:length="8" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="dateSent" type="xsd:string"/>
      <xsd:element dfdl:length="8" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="datePosted" type="xsd:string"/>
      <xsd:element dfdl:length="7" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="fileRecordCnt" type="xsd:string"/>
      <xsd:element dfdl:length="558" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="filler" type="xsd:string"/>
    </xsd:sequence>
  </xsd:complexType>
    <xsd:element dfdl:lengthKind="delimited" ibmSchExtn:docRoot="true" name="InsRespMessage">
    <xsd:complexType>
      <xsd:sequence dfdl:separator="">
        <xsd:element dfdl:terminator="%#r0d;%#r0a;" name="HeaderRecord" type="HeaderRecord"/>
         <xsd:element dfdl:occursCountKind="implicit" maxOccurs="unbounded" name="DetailRecord" type="DetailResponseRecord">
          <xsd:annotation>
            <xsd:appinfo source="http://www.ogf.org/dfdl/">
              <dfdl:discriminator>{/InsRespMessage/DetailRecord/recordIdentifier eq 'D'}</dfdl:discriminator>
            </xsd:appinfo>
          </xsd:annotation>
        </xsd:element>
                <xsd:element maxOccurs="1" name="TrailerRecord" type="TrailRecord">
          <xsd:annotation>
            <xsd:appinfo source="http://www.ogf.org/dfdl/">
             
            </xsd:appinfo>
          </xsd:annotation>
        </xsd:element>
            </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
    <xsd:complexType name="DetailResponseRecord">
    <xsd:sequence dfdl:separator="">
       <xsd:element dfdl:length="6" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" name="sequenceNumber" type="xsd:string"/>
       <xsd:element dfdl:length="1" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="recordIdentifier" type="xsd:string"/>
      <xsd:element dfdl:length="30" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="claimNumber" type="xsd:string"/>
      <xsd:element dfdl:length="9" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="insuringCompanyCode" type="xsd:string"/>
    </xsd:sequence>
  </xsd:complexType>                                                                                                                                                                                       </xsd:sequence>
   <xsd:element name="InsHeader" type="HeaderRecord"/>
    <xsd:complexType name="HeaderRecord">
    <xsd:sequence dfdl:separator="">
      <xsd:element dfdl:length="6" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="sequenceNumber" type="xsd:string"/>
      <xsd:element dfdl:length="1" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="recordIdentifier" type="xsd:string"/>
      <xsd:element dfdl:length="7" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="reportingFiletype" type="xsd:string"/>
      <xsd:element dfdl:length="8" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="dateSent" type="xsd:string"/>
      <xsd:element dfdl:length="8" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="datePosted" type="xsd:string"/>
      <xsd:element dfdl:length="558" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="filler" type="xsd:string"/>
     </xsd:sequence>
  </xsd:complexType>
    <xsd:annotation>
      <xsd:appinfo source="http://www.ogf.org/dfdl/">
         <dfdl:format ref="fmt:GeneralPurposeFormat"/>
      </xsd:appinfo>
   </xsd:annotation>
   
</xsd:schema>


The Detail record is Unbounded.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Feb 18, 2015 10:51 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

fjb_saper wrote:
You could use it as a field initiator but not as a record initiator (not the first field on the record)...
But you can use it as a record discriminator...


I got my terms in a tangle
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Feb 18, 2015 10:55 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Cubersome wrote:
I added the 2nd Column as discriminator for the Detail Record and still it is not working.


Not working how? Not recognizing the record type? Not parsing at all? Not understanding what you meant even though it's not what you typed? Not working until it gets union recognition and a pension plan?

Be specific. Post the error, if any, and the symptoms, if any. Offer (properly sanitized) example input data as well as the DFDL.

And use code tags when you post code

The DFDL schema, like any XML or code, is unreadable without the indentation, which is not preserved when posted here unless tagged. Or at least not readable without the kind of effort a bunch of aging volunteers on the Internet are prepared to provide without additional motivation.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Cubersome
PostPosted: Wed Feb 18, 2015 11:28 am    Post subject: Reply with quote

Apprentice

Joined: 02 Mar 2012
Posts: 37

Code:
<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" xmlns:fmt="http://www.ibm.com/dfdl/GeneralPurposeFormat" xmlns:ibmDfdlExtn="http://www.ibm.com/dfdl/extensions" xmlns:ibmSchExtn="http://www.ibm.com/schema/extensions" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   
   

    <xsd:import namespace="http://www.ibm.com/dfdl/GeneralPurposeFormat" schemaLocation="IBMdefined/GeneralPurposeFormat.xsd"/>

  <xsd:complexType name="TrailRecord">
    <xsd:sequence>
      <xsd:element dfdl:length="6" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="sequenceNumber" type="xsd:string"/>
      <xsd:element dfdl:length="1" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="recordIdentifier" type="xsd:string"/>
      <xsd:element dfdl:length="8" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="dateSent" type="xsd:string"/>
      <xsd:element dfdl:length="8" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="datePosted" type="xsd:string"/>
      <xsd:element dfdl:length="7" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="fileRecordCnt" type="xsd:string"/>
      <xsd:element dfdl:length="558" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="filler" type="xsd:string"/>
    </xsd:sequence>
  </xsd:complexType>
    <xsd:element dfdl:lengthKind="delimited" ibmSchExtn:docRoot="true" name="InsRespMessage">
    <xsd:complexType>
      <xsd:sequence dfdl:separator="">
        <xsd:element dfdl:terminator="%#r0d;%#r0a;" name="HeaderRecord" type="HeaderRecord"/>
                                                                                                                                                          <xsd:element dfdl:occursCountKind="implicit" maxOccurs="unbounded" name="DetailRecord" type="DetailResponseRecord">
          <xsd:annotation>
            <xsd:appinfo source="http://www.ogf.org/dfdl/">
              <dfdl:discriminator>{/InsRespMessage/DetailRecord[1]/recordIdentifier eq 'D'}</dfdl:discriminator>
            </xsd:appinfo>
          </xsd:annotation>
        </xsd:element>
                <xsd:element maxOccurs="1" name="TrailerRecord" type="TrailRecord">
          <xsd:annotation>
            <xsd:appinfo source="http://www.ogf.org/dfdl/">
             
            </xsd:appinfo>
          </xsd:annotation>
        </xsd:element>
            </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
    <xsd:complexType name="DetailResponseRecord">
    <xsd:sequence dfdl:separator="">
            <xsd:element dfdl:length="6" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" name="sequenceNumber" type="xsd:string"/>
            <xsd:element dfdl:length="1" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="recordIdentifier" type="xsd:string"/>
            <xsd:element dfdl:length="30" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="claimNumber" type="xsd:string"/>
            <xsd:element dfdl:length="9" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="insuringCompanyCode" type="xsd:string"/>
                                                                                                                                        </xsd:sequence>
  </xsd:complexType>

    <xsd:complexType name="HeaderRecord">
    <xsd:sequence dfdl:separator="">
      <xsd:element dfdl:length="6" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="sequenceNumber" type="xsd:string"/>
      <xsd:element dfdl:length="1" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="recordIdentifier" type="xsd:string"/>
      <xsd:element dfdl:length="8" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="dateSent" type="xsd:string"/>
      <xsd:element dfdl:length="8" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="datePosted" type="xsd:string"/>
      <xsd:element dfdl:length="558" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="filler" type="xsd:string"/>
                              </xsd:sequence>
  </xsd:complexType>
    <xsd:annotation>
      <xsd:appinfo source="http://www.ogf.org/dfdl/">
         <dfdl:format ref="fmt:GeneralPurposeFormat"/>
      </xsd:appinfo>
   </xsd:annotation>
   

</xsd:schema>


With the abode DFDL the data is parsing...But the last record in the file is getting parsed with the Detail record instead of the Trailer record
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Feb 18, 2015 11:36 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

this:
Code:
  <xsd:element dfdl:lengthKind="delimited" ibmSchExtn:docRoot="true" name="InsRespMessage">
    <xsd:complexType>
      <xsd:sequence dfdl:separator="">

needs to be a choice, not a sequence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Feb 18, 2015 11:39 am    Post subject: Reply with quote

Grand High Poobah

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

mqjeff wrote:
this:
Code:
  <xsd:element dfdl:lengthKind="delimited" ibmSchExtn:docRoot="true" name="InsRespMessage">
    <xsd:complexType>
      <xsd:sequence dfdl:separator="">

needs to be a choice, not a sequence.

Which also means that you should put a discriminator on each type of record, header, detail, and trailer...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Cubersome
PostPosted: Thu Feb 19, 2015 6:44 am    Post subject: Reply with quote

Apprentice

Joined: 02 Mar 2012
Posts: 37

Hi,
Following is the latest DFDL I created.. I included Discriminators for each record type and still it is not working.
Code:

<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" xmlns:fmt="http://www.ibm.com/dfdl/GeneralPurposeFormat" xmlns:ibmDfdlExtn="http://www.ibm.com/dfdl/extensions" xmlns:ibmSchExtn="http://www.ibm.com/schema/extensions" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   
   

    <xsd:import namespace="http://www.ibm.com/dfdl/GeneralPurposeFormat" schemaLocation="IBMdefined/GeneralPurposeFormat.xsd"/>
                                        <xsd:complexType name="TrailRecord">
    <xsd:sequence>
      <xsd:element dfdl:length="6" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="sequenceNumber" type="xsd:string"/>
      <xsd:element dfdl:length="1" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="recordIdentifier" type="xsd:string"/>
      <xsd:element dfdl:length="8" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="dateSent" type="xsd:string"/>
      <xsd:element dfdl:length="8" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="datePosted" type="xsd:string"/>
      <xsd:element dfdl:length="7" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="fileRecordCnt" type="xsd:string"/>
          </xsd:sequence>
  </xsd:complexType>
    <xsd:element dfdl:lengthKind="delimited" dfdl:terminator="" ibmSchExtn:docRoot="true" name="InsRespMessage">
    <xsd:complexType>
      <xsd:choice dfdl:separator="" dfdl:terminator="">
        <xsd:element dfdl:lengthKind="delimited" dfdl:terminator="%CR;%LF;" name="HeaderRecord" type="HeaderRecord">
          <xsd:annotation>
            <xsd:appinfo source="http://www.ogf.org/dfdl/">
              <dfdl:discriminator>{/InsRespMessage/HeaderRecord/recordIdentifier eq 'H'}</dfdl:discriminator>
            </xsd:appinfo>
          </xsd:annotation>
        </xsd:element>
                                                                                                                                                          <xsd:element dfdl:occursCountKind="implicit" dfdl:terminator="%CR;%LF;" maxOccurs="unbounded" name="DetailRecord" type="DetailResponseRecord">
          <xsd:annotation>
            <xsd:appinfo source="http://www.ogf.org/dfdl/">
              <dfdl:discriminator>{/InsRespMessage/DetailRecord[1]/recordIdentifier eq 'D'}</dfdl:discriminator>
            </xsd:appinfo>
          </xsd:annotation>
        </xsd:element>
                <xsd:element dfdl:terminator="%CR;%LF;" maxOccurs="1" name="TrailerRecord" type="TrailRecord">
          <xsd:annotation>
            <xsd:appinfo source="http://www.ogf.org/dfdl/">
             
            <dfdl:discriminator>{/InsRespMessage/TrailerRecord/recordIdentifier eq 'T'}</dfdl:discriminator>
            </xsd:appinfo>
          </xsd:annotation>
        </xsd:element>
            </xsd:choice>
    </xsd:complexType>
  </xsd:element>
    <xsd:complexType name="DetailResponseRecord">
    <xsd:sequence dfdl:separator="">
            <xsd:element dfdl:length="6" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" name="sequenceNumber" type="xsd:string"/>
            <xsd:element dfdl:length="1" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="recordIdentifier" type="xsd:string"/>
            <xsd:element dfdl:length="30" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="claimNumber" type="xsd:string"/>
            <xsd:element dfdl:length="9" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="insuringCompanyCode" type="xsd:string"/>
    </xsd:sequence>
  </xsd:complexType>

    <xsd:complexType name="HeaderRecord">
    <xsd:sequence dfdl:separator="" dfdl:terminator="">
      <xsd:element dfdl:length="6" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="sequenceNumber" type="xsd:string"/>
      <xsd:element dfdl:length="1" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="recordIdentifier" type="xsd:string"/>
      <xsd:element dfdl:length="8" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="dateSent" type="xsd:string"/>
      <xsd:element dfdl:length="8" dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:representation="text" name="datePosted" type="xsd:string"/>
    </xsd:sequence>
  </xsd:complexType>
    <xsd:annotation>
      <xsd:appinfo source="http://www.ogf.org/dfdl/">
         <dfdl:format ref="fmt:GeneralPurposeFormat"/>
      </xsd:appinfo>
   </xsd:annotation>
   

</xsd:schema>

Input File Layout:

Code:

000001H2013053120130531
000002D1000042933                    Z99900001
000003D1000042934                    Z99900001
000004D714719                           Z99900001
000005D819074                           Z99900001
000006T0130531201305310000004


With the above DFDL, it is parsing only Header record and it is throwing error at the beginining of the Detail Record

Code:

eb 19, 2015 9:26:13 AM   info: Offset: 15. Starting to process element 'datePosted'.
                          [dfdl = /CM_FileProcessingFramework_DFDL_MLP/MediCareQueryResp.xsd, scd = #xscd(/type::HeaderRecord/model::sequence/schemaElement::datePosted), 61]

Feb 19, 2015 9:26:13 AM   info: Offset: 15. Found fixed length value: '20130531' for element 'datePosted'.
                          [dfdl = /CM_FileProcessingFramework_DFDL_MLP/MediCareQueryResp.xsd, scd = #xscd(/type::HeaderRecord/model::sequence/schemaElement::datePosted), 82]

Feb 19, 2015 9:26:13 AM   info: Offset: 23. Finished processing element 'datePosted'.
                          [dfdl = /CM_FileProcessingFramework_DFDL_MLP/MediCareQueryResp.xsd, scd = #xscd(/type::HeaderRecord/model::sequence/schemaElement::datePosted), 61]

Feb 19, 2015 9:26:13 AM   info: Offset: 23. Found terminator '%CR;%LF;' for 'HeaderRecord'.
                          [dfdl = /CM_FileProcessingFramework_DFDL_MLP/MediCareQueryResp.xsd, scd = #xscd(/schemaElement::InsRespMessage/type::0/model::choice/schemaElement::HeaderRecord), 67]

Feb 19, 2015 9:26:13 AM   info: Offset: 25. Finished processing element 'HeaderRecord'.
                          [dfdl = /CM_FileProcessingFramework_DFDL_MLP/MediCareQueryResp.xsd, scd = #xscd(/schemaElement::InsRespMessage/type::0/model::choice/schemaElement::HeaderRecord), 63]

Feb 19, 2015 9:26:13 AM   info: Offset: 25. Finished processing element 'InsRespMessage'.
                          [dfdl = /CM_FileProcessingFramework_DFDL_MLP/MediCareQueryResp.xsd, scd = #xscd(/schemaElement::InsRespMessage), 65]

Feb 19, 2015 9:26:13 AM   fatal: CTDP3002E: Unexpected data found at offset '25' after parsing completed. Data: '0x30...'.



Any help would be greatly appreciated.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Feb 19, 2015 7:08 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Cubersome wrote:
Any help would be greatly appreciated.


Firstly, very nicely laid out post. You are to be congratulated.

Secondly, @mqjeff has already told you that this is a choice not a sequence. Each record in the file is a Header or a Trailer or a Detail, not one of each.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Feb 19, 2015 7:10 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Vitor wrote:
Cubersome wrote:
Any help would be greatly appreciated.


Firstly, very nicely laid out post. You are to be congratulated.

Secondly, @mqjeff has already told you that this is a choice not a sequence. Each record in the file is a Header or a Trailer or a Detail, not one of each.


Well, in theory that's true.

But probably there's a record that represents a single header, a repeating record that represents 0 or more details (or perhaps one or more), and a single record that represents a trailer.

So there needs to be a sequence that indicates that, instead of indicating that a header can come in any order relative to a trailer or detail.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3  Next Page 2 of 3

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DFDL Parsing - \r Issue
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.