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 » Message broker : DFDL Parsing issue for Fixed length

Post new topic  Reply to topic
 Message broker : DFDL Parsing issue for Fixed length « View previous topic :: View next topic » 
Author Message
Anoopkj
PostPosted: Thu Feb 23, 2017 6:16 am    Post subject: Message broker : DFDL Parsing issue for Fixed length Reply with quote

Newbie

Joined: 23 Feb 2017
Posts: 2

Hi,

I have one issue regarding one DFDL parsing of a fixed length message with initiators.
Message is as below.

TMXSTMXD03000001178500000119920010 N132-6010 3.00 331.22 YT0193 1 TMXL203251
TMXL203252
TMXD03000001178500000119920020 N142-1057 2.00 377.91 YT0194 1 TMXL310241
TMXD03000001178500000119920030 N142-1057 2.00 377.91 YT0195 1 TMXL721579
TMXL721580

'TMXS' Initiator header will occur only once.
'TMXD' initator records will have multiple entries ,multiple lines.
The last element of 'TMXD' (lotNumber-12 bytes) with initiator 'TMXL' can occur one or more times within one 'TMXD' record
If present multiple times,first entry will be the last element of one TMXD line record,repeating entries will be in successive lines.(after 4 spaces from beginning of the line)


I need some help in parsing this ,will post logs and code in thread(as first post not able to do )
Back to top
View user's profile Send private message
Anoopkj
PostPosted: Thu Feb 23, 2017 6:17 am    Post subject: Reply with quote

Newbie

Joined: 23 Feb 2017
Posts: 2

I have specified the DFDL schema as below..
Code:


<?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:ibmDfdlExtn="http://www.ibm.com/dfdl/extensions" 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:annotation>
      <xsd:appinfo source="http://www.ogf.org/dfdl/">
         <dfdl:format encoding="{$dfdl:encoding}" escapeSchemeRef="" occursCountKind="fixed" ref="recFixLengthFieldsFmt:RecordFixLengthFieldsFormat"/>
      </xsd:appinfo>
   </xsd:annotation>

   <xsd:element dfdl:lengthKind="delimited" dfdl:terminator="" ibmSchExtn:docRoot="true" name="abc">
      <xsd:complexType>
         <xsd:sequence dfdl:separator="" dfdl:separatorSuppressionPolicy="anyEmpty" dfdl:terminator="">
                                        <xsd:element dfdl:length="4" name="Header">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element dfdl:length="4" name="Shipping_Stack">
                <xsd:simpleType>
                  <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="4"/>
                  </xsd:restriction>
                </xsd:simpleType>
              </xsd:element>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
                <xsd:element dfdl:initiator="" dfdl:lengthKind="delimited" dfdl:occursCountKind="implicit" dfdl:outputNewLine="{}" dfdl:terminator="" maxOccurs="unbounded" name="body">
               <xsd:complexType>
                  <xsd:sequence dfdl:initiator="TMXD">
                                          <xsd:element dfdl:length="2" ibmDfdlExtn:sampleValue="body_valu2" name="recordIdentifier">
                <xsd:simpleType>
                  <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="2"/>
                  </xsd:restriction>
                </xsd:simpleType>
              </xsd:element>
                     <xsd:element dfdl:length="10" ibmDfdlExtn:sampleValue="body_valu3" name="signalNumber">
                <xsd:simpleType>
                  <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="10"/>
                  </xsd:restriction>
                </xsd:simpleType>
              </xsd:element>
                            <xsd:element dfdl:length="10" ibmDfdlExtn:sampleValue="body_value4" name="jitNumber">
                <xsd:simpleType>
                  <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="10"/>
                  </xsd:restriction>
                </xsd:simpleType>
              </xsd:element>
                            <xsd:element dfdl:length="5" ibmDfdlExtn:sampleValue="body_value5" name="lineItem">
                <xsd:simpleType>
                  <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="5"/>
                  </xsd:restriction>
                </xsd:simpleType>
              </xsd:element>
                            <xsd:element dfdl:length="40" ibmDfdlExtn:sampleValue="body_value6" name="materialNumber">
                <xsd:simpleType>
                  <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="40"/>
                  </xsd:restriction>
                </xsd:simpleType>
              </xsd:element>
                            <xsd:element dfdl:length="13" ibmDfdlExtn:sampleValue="body_value7" name="quantity">
                <xsd:simpleType>
                  <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="13"/>
                  </xsd:restriction>
                </xsd:simpleType>
              </xsd:element>
                            <xsd:element dfdl:length="13" ibmDfdlExtn:sampleValue="body_value8" name="netWeight">
                <xsd:simpleType>
                  <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="13"/>
                  </xsd:restriction>
                </xsd:simpleType>
              </xsd:element>
                            <xsd:element dfdl:length="16" ibmDfdlExtn:sampleValue="body_value9" name="packingSlipNumber">
                <xsd:simpleType>
                  <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="16"/>
                  </xsd:restriction>
                </xsd:simpleType>
              </xsd:element>
                                                    <xsd:element dfdl:length="3" name="numberOfPackages">
                <xsd:simpleType>
                  <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="3"/>
                  </xsd:restriction>
                </xsd:simpleType>
              </xsd:element>
                            <xsd:element dfdl:emptyValueDelimiterPolicy="terminator" dfdl:initiator="TMXL" dfdl:length="12" dfdl:nilValueDelimiterPolicy="terminator" dfdl:occursCountKind="implicit" dfdl:terminator="%WSP*;" maxOccurs="unbounded" minOccurs="0" name="LotNumber">
                <xsd:simpleType>
                  <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="12"/>
                  </xsd:restriction>
                </xsd:simpleType>
              </xsd:element>
                        </xsd:sequence>
               </xsd:complexType>
            </xsd:element>
                                                                 </xsd:sequence>
      </xsd:complexType>
   </xsd:element>


</xsd:schema>



Last edited by Anoopkj on Thu Feb 23, 2017 9:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
timber
PostPosted: Thu Feb 23, 2017 3:21 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Quote:
I need some help in parsing this ,will post logs and code in thread(as first post not able to do )
If you want our help, please make it easy for us. Do not post kilobytes of text and expect us to read it. We are not employees of your company; we are volunteers who like to help people if they respect our time.

You have not even described the problem you are encountering. Apparently, we are supposed to read your DFDL schema and work that out for ourselves!
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 » Message broker : DFDL Parsing issue for Fixed length
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.