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 Pad on serialize

Post new topic  Reply to topic Goto page 1, 2  Next
 DFDL Pad on serialize « View previous topic :: View next topic » 
Author Message
damianharvey
PostPosted: Mon Sep 10, 2012 6:48 pm    Post subject: DFDL Pad on serialize Reply with quote

Acolyte

Joined: 05 Aug 2003
Posts: 59
Location: Sydney, Australia

Hello all,

I am trying to create a DFDL model for a fixed-width flat-file. I have defined each field and it parses fine. The problem comes when trying to serialize. It does not pad out the values.

If the logical instance XML has a value with a length of 4 and the required field has a length of 5, then the serialize will not pad it unless the attribute textPadKind="padChar" (not available in the Broker Toolkit UI) is addded. Unfortunately this doesn't work for values of null or empty (<value/>).

This page has some helpful suggestions: http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fdf20092_.htm
...such as dfdl:textOutputMinLength, but unfortunately none have worked.

Can anyone suggest what might work here? Happy to post the XSD if it helps.

Much appreciated.

Damian.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Sep 11, 2012 2:05 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
I am trying to create a DFDL model for a fixed-width flat-file. I have defined each field and it parses fine.
Good - nice to hear about the successes as well as the failures
Quote:
If the logical instance XML has a value with a length of 4 and the required field has a length of 5, then the serialize will not pad it unless the attribute textPadKind="padChar" (not available in the Broker Toolkit UI) is addded.
You have probably fallen foul of a 'usability' feature in the DFDL editor. In order to simplify the experience, only the basic properties are displayed. You can see the full range of DFDL properties by clicking the 'Advanced' button at the top of the screen. 'Pad Kind' is under the 'Text Content' section.
Quote:
Unfortunately this doesn't work for values of null or empty (<value/>).
This is a common area of confusion, and not only with DFDL. There is a huge range of requirements around padding/trimming, and DFDL attempts to address all of them. That means a lot of properties.
I'm not sure exactly what your problem is, because I haven't seen your message tree. But here's how it should work:
- Fields that are present in the tree but too short will be padded with textPadCharacter if textPadKind='PadChar'. But only if their 'Representation' property is set to 'Text' and not 'Binary'.
- Fields that are present in the tree with zero length qualify under the previous rule - they should be padded.
- Fields that are present in the tree with the special value of NULL will be written according to the DFDL null handling properties. These are: xs:nillable, dfdl:nilKind ( you probably want to set it to nilLiteralCharacter ) and nilLiteralValue.

Feel free to post your xsd if it's not confidential. If you do, please use [c o d e] tags to make it readable by humans.
Back to top
View user's profile Send private message
damianharvey
PostPosted: Sun Sep 16, 2012 9:19 pm    Post subject: Reply with quote

Acolyte

Joined: 05 Aug 2003
Posts: 59
Location: Sydney, Australia

Thanks Kimbert.

Nice tip about the advanced mode. I hadn't noticed it.

Below is my XSD and some sample data. I appreciate your help.

Code:

<?xml version="1.0" encoding="UTF-8"?><xsd:schema 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" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

   <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 byteOrder="{$dfdl:byteOrder}" textPadKind="padChar" lengthUnits="characters" encoding="{$dfdl:encoding}" escapeSchemeRef="recFixLengthFieldsFmt:RecordEscapeScheme" lengthKind="explicit" ref="recFixLengthFieldsFmt:RecordFixLengthFieldsFormat" separatorPolicy="suppressed"/>
      </xsd:appinfo>
   </xsd:annotation>

   <xsd:element dfdl:lengthKind="implicit" ibmSchExtn:docRoot="true" name="FMIS_GL">
      <xsd:complexType>
         <xsd:sequence>
            <xsd:element dfdl:occursCountKind="implicit" maxOccurs="unbounded" ref="record"/>
                     </xsd:sequence>
      </xsd:complexType>
   </xsd:element>
   
   <xsd:element dfdl:lengthKind="implicit" ibmSchExtn:docRoot="true" name="record">
      <xsd:complexType>
         <xsd:sequence dfdl:separator="">
            <xsd:element dfdl:initiator="H" dfdl:lengthKind="implicit" dfdl:terminator="%CR;%LF;%WSP*;" maxOccurs="1" name="header">
               <xsd:complexType>
                                                         <xsd:sequence dfdl:separatorPolicy="suppressedAtEndLax">
                     <xsd:element dfdl:length="5" dfdl:textOutputMinLength="5" ibmDfdlExtn:sampleValue="TPNZ" name="business_unit" type="xsd:string"/>
                     <xsd:element dfdl:length="10" ibmDfdlExtn:sampleValue="001790" name="journal_id" type="xsd:string"/>
                     <xsd:element dfdl:length="8" ibmDfdlExtn:sampleValue="02192010" name="journal_date" type="xsd:string"/>
                     <xsd:element dfdl:length="10" ibmDfdlExtn:sampleValue="ACTUALS" name="ledger_group" type="xsd:string"/>
                     <xsd:element dfdl:length="1" ibmDfdlExtn:sampleValue="N" name="reversal_cd" type="xsd:string"/>
                     <xsd:element dfdl:length="8" ibmDfdlExtn:sampleValue=" " name="reversal_date" type="xsd:string"/>
                     <xsd:element dfdl:length="3" ibmDfdlExtn:sampleValue="MMS" name="source" type="xsd:string"/>
                     <xsd:element dfdl:length="8" ibmDfdlExtn:sampleValue="02589399" name="trans_ref_num" type="xsd:string"/>
                     <xsd:element dfdl:length="30" ibmDfdlExtn:sampleValue="Clear MMS suspense refund form" name="descry" type="xsd:string"/>
                     <xsd:element dfdl:length="3" ibmDfdlExtn:sampleValue="NZD" name="currency_cd" type="xsd:string"/>
                     <xsd:element dfdl:length="5" ibmDfdlExtn:sampleValue="CRRNT" name="curr_rt_type" type="xsd:string"/>
                     <xsd:element dfdl:length="8" ibmDfdlExtn:sampleValue="02192010" name="cur_effdt" type="xsd:string"/>
                     <xsd:element dfdl:length="16" ibmDfdlExtn:sampleValue=" " name="cur_exchng_rt" type="xsd:string"/>
                  </xsd:sequence>
                    </xsd:complexType>
            </xsd:element>
            <xsd:element dfdl:initiator="L" dfdl:lengthKind="implicit" dfdl:occursCountKind="implicit" dfdl:terminator="%CR;%LF;%WSP*;" maxOccurs="unbounded" name="body">
               <xsd:complexType>
                  <xsd:sequence dfdl:initiator="" dfdl:separatorPolicy="suppressedAtEndLax">
                     <xsd:element dfdl:length="5" ibmDfdlExtn:sampleValue="TPNZ" name="business_unit" type="xsd:string"/>
                     <xsd:element dfdl:length="6" ibmDfdlExtn:sampleValue=" " name="journal_line" type="xsd:string"/>
                     <xsd:element dfdl:length="10" ibmDfdlExtn:sampleValue="ACTUALS" name="ledger" type="xsd:string"/>
                     <xsd:element dfdl:length="6" ibmDfdlExtn:sampleValue="532003" name="account" type="xsd:string"/>
                     <xsd:element dfdl:length="10" ibmDfdlExtn:sampleValue="560" name="deptid" type="xsd:string"/>
                     <xsd:element dfdl:length="6" ibmDfdlExtn:sampleValue=" " name="product" type="xsd:string"/>
                     <xsd:element dfdl:length="15" ibmDfdlExtn:sampleValue=" " name="project_id" type="xsd:string"/>
                     <xsd:element dfdl:length="5" ibmDfdlExtn:sampleValue="12345" name="affiliate" type="xsd:string"/>
                     <xsd:element dfdl:length="3" ibmDfdlExtn:sampleValue=" " name="statistic_code" type="xsd:string"/>
                     <xsd:element dfdl:length="3" ibmDfdlExtn:sampleValue="NZD" name="currency_cd" type="xsd:string"/>
                     <xsd:element dfdl:length="16" ibmDfdlExtn:sampleValue="        37932.61" name="monetary_amount" type="xsd:string"/>
                     <xsd:element dfdl:length="16" ibmDfdlExtn:sampleValue=" " name="statistic_amount" type="xsd:string"/>
                     <xsd:element dfdl:length="10" ibmDfdlExtn:sampleValue="00000000486" name="jrnl_ln_ref" type="xsd:string"/>
                     <xsd:element dfdl:length="30" ibmDfdlExtn:sampleValue="817054 1 Clear MMS suspense re - Derived etc" name="line_descr" type="xsd:string"/>
                     <xsd:element dfdl:length="5" ibmDfdlExtn:sampleValue=" " name="cur_rt_type" type="xsd:string"/>
                     <xsd:element dfdl:length="16" ibmDfdlExtn:sampleValue=" " name="cur_exchng_rt" type="xsd:string"/>
                     <xsd:element dfdl:length="16" ibmDfdlExtn:sampleValue="        37932.61" name="foreign_amount" type="xsd:string"/>
                  </xsd:sequence>
               </xsd:complexType>
            </xsd:element>
                                     </xsd:sequence>
      </xsd:complexType>
   </xsd:element>


</xsd:schema>


Code:

HAAAA 001982    07152011ACTUALS   N        MMS02876436Jnl to transfer Test refund tUSDCRRNT07152011               
LAAAA       ACTUALS   532003560                                    USD         7560.00                0000000549/ Jnl to transfer Test refund                              7560.00
LAAAA       ACTUALS   511001560                                    USD        -1890.00                0000000549322865/1 Jnl to transfer Test                             -1890.00
LAAAA       ACTUALS   511001560                                    USD        -1890.00                0000000549322861/1 Jnl to transfer Test                             -1890.00
LAAAA       ACTUALS   511001560                                    USD        -1890.00                0000000549323005/1 Jnl to transfer Test                             -1890.00
LAAAA       ACTUALS   511001560                                    USD        -1890.00                0000000549322875/1 Jnl to transfer Test                             -1890.00
HAAAA 001983    07182011ACTUALS   N        MMS02876858KCE and UGL refunds to transfeUSDCRRNT07182011               
LAAAA       ACTUALS   532003560                                    USD          910.02                0000000549/ KCE and UGL refunds to trans                               910.02
LAAAA       ACTUALS   531001560                                    USD         -666.10                0000000549432237/1 KCE and UGL refunds t                              -666.10
LAAAA       ACTUALS   521001560                                    USD          -57.24                0000000549432257/1 KCE and UGL refunds t                               -57.24
LAAAA       ACTUALS   521001560                                    USD         -186.68                0000000549581716/1 KCE and UGL refunds t                              -186.68

Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Sep 17, 2012 12:43 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I think I'll need a little more information before I can help. Can you please add a Trace node just before the output node, and post
a) the message tree and
b) the actual output that was produced for that exact message tree

If possible, please include examples of what you are calling 'null' and 'empty' fields, and indicate which fields are which.
Back to top
View user's profile Send private message
damianharvey
PostPosted: Mon Sep 17, 2012 12:56 am    Post subject: Reply with quote

Acolyte

Joined: 05 Aug 2003
Posts: 59
Location: Sydney, Australia

Sorry I should have been clearer. This is not a deployed flow, it's from the DFDL editor. I'll deploy it tomorrow and check whether its just a toolkit issue.

Thanks.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Sep 17, 2012 2:15 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

OK. The alternative approach would be to post the XML version of the info set instead of the Trace node output. You should be able to get the XML by clicking on the tab in the DFDL Info set view ( top right in the DFDL debug perspective ).
Back to top
View user's profile Send private message
damianharvey
PostPosted: Mon Sep 17, 2012 9:04 pm    Post subject: Reply with quote

Acolyte

Joined: 05 Aug 2003
Posts: 59
Location: Sydney, Australia

So I built a little flow that takes the XML representation of the message, copies it to the DFDL domain and outputs it on a Queue. Below is the result of the trace node just before the output. The actual output is pasted below that. Compare to the expected output that I have pasted at the bottom.

Some examples of where where nulls/empty fields aren't being padded are reversal_date in the header and journal_line in the body.

Thanks again!

The ESQL to copy the message from XMLNSC to DFDL is:
Code:

SET OutputRoot.DFDL.FMIS_GL = InputRoot.XMLNSC.FMIS_GL;


Trace of ${Root} just before the MQOutput:
Code:

( ['MQROOT' : 0xcae50a0]
  (0x01000000:Name):Properties = ( ['MQPROPERTYPARSER' : 0xcc09c90]
    (0x03000000:NameValue):MessageSet             = '' (CHARACTER)
    (0x03000000:NameValue):MessageType            = '' (CHARACTER)
    (0x03000000:NameValue):MessageFormat          = '' (CHARACTER)
    (0x03000000:NameValue):Encoding               = 546 (INTEGER)
    (0x03000000:NameValue):CodedCharSetId         = 437 (INTEGER)
    (0x03000000:NameValue):Transactional          = TRUE (BOOLEAN)
    (0x03000000:NameValue):Persistence            = FALSE (BOOLEAN)
    (0x03000000:NameValue):CreationTime           = GMTTIMESTAMP '2012-09-18 04:52:32.180' (GMTTIMESTAMP)
    (0x03000000:NameValue):ExpirationTime         = -1 (INTEGER)
    (0x03000000:NameValue):Priority               = 0 (INTEGER)
    (0x03000000:NameValue):ReplyIdentifier        = X'000000000000000000000000000000000000000000000000' (BLOB)
    (0x03000000:NameValue):ReplyProtocol          = 'MQ' (CHARACTER)
    (0x03000000:NameValue):Topic                  = NULL
    (0x03000000:NameValue):ContentType            = '' (CHARACTER)
    (0x03000000:NameValue):IdentitySourceType     = '' (CHARACTER)
    (0x03000000:NameValue):IdentitySourceToken    = '' (CHARACTER)
    (0x03000000:NameValue):IdentitySourcePassword = '' (CHARACTER)
    (0x03000000:NameValue):IdentitySourceIssuedBy = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedType     = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedToken    = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedPassword = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedIssuedBy = '' (CHARACTER)
  )
  (0x01000000:Name):MQMD       = ( ['MQHMD' : 0xcb2dc50]
    (0x03000000:NameValue):SourceQueue      = 'AMIS.FMIS.GL.FLATFILE' (CHARACTER)
    (0x03000000:NameValue):Transactional    = TRUE (BOOLEAN)
    (0x03000000:NameValue):Encoding         = 546 (INTEGER)
    (0x03000000:NameValue):CodedCharSetId   = 437 (INTEGER)
    (0x03000000:NameValue):Format           = '        ' (CHARACTER)
    (0x03000000:NameValue):Version          = 2 (INTEGER)
    (0x03000000:NameValue):Report           = 0 (INTEGER)
    (0x03000000:NameValue):MsgType          = 8 (INTEGER)
    (0x03000000:NameValue):Expiry           = -1 (INTEGER)
    (0x03000000:NameValue):Feedback         = 0 (INTEGER)
    (0x03000000:NameValue):Priority         = 0 (INTEGER)
    (0x03000000:NameValue):Persistence      = 0 (INTEGER)
    (0x03000000:NameValue):MsgId            = X'414d512054502e434553422e44455620da6d565020151206' (BLOB)
    (0x03000000:NameValue):CorrelId         = X'000000000000000000000000000000000000000000000000' (BLOB)
    (0x03000000:NameValue):BackoutCount     = 0 (INTEGER)
    (0x03000000:NameValue):ReplyToQ         = '                                                ' (CHARACTER)
    (0x03000000:NameValue):ReplyToQMgr      = 'TP.CESB.DEV                                     ' (CHARACTER)
    (0x03000000:NameValue):UserIdentifier   = 'mqmbrk      ' (CHARACTER)
    (0x03000000:NameValue):AccountingToken  = X'16010515000000a1185c3218ceb3f6aaf15038e903000000000000000000000b' (BLOB)
    (0x03000000:NameValue):ApplIdentityData = '                                ' (CHARACTER)
    (0x03000000:NameValue):PutApplType      = 11 (INTEGER)
    (0x03000000:NameValue):PutApplName      = 's\rfhutil - ih03\rfhutil.exe' (CHARACTER)
    (0x03000000:NameValue):PutDate          = DATE '2012-09-18' (DATE)
    (0x03000000:NameValue):PutTime          = GMTTIME '04:52:32.180' (GMTTIME)
    (0x03000000:NameValue):ApplOriginData   = '    ' (CHARACTER)
    (0x03000000:NameValue):GroupId          = X'000000000000000000000000000000000000000000000000' (BLOB)
    (0x03000000:NameValue):MsgSeqNumber     = 1 (INTEGER)
    (0x03000000:NameValue):Offset           = 0 (INTEGER)
    (0x03000000:NameValue):MsgFlags         = 0 (INTEGER)
    (0x03000000:NameValue):OriginalLength   = -1 (INTEGER)
  )
  (0x01000000:Name):DFDL       = ( ['dfdl' : 0xcae5a30]
    (0x01000000:Name):FMIS_GL = (
      (0x03000000:NameValue)http://www.w3.org/2000/xmlns/:xs  = 'http://www.w3.org/2001/XMLSchema' (CHARACTER)
      (0x03000000:NameValue)http://www.w3.org/2000/xmlns/:xsi = 'http://www.w3.org/2001/XMLSchema-instance' (CHARACTER)
      (0x01000000:Name     ):record                           = (
        (0x01000000:Name):header = (
          (0x03000000:NameValue):business_unit = 'AAAA' (CHARACTER)
          (0x03000000:NameValue):journal_id    = '001982' (CHARACTER)
          (0x03000000:NameValue):journal_date  = '07152011' (CHARACTER)
          (0x03000000:NameValue):ledger_group  = 'ACTUALS' (CHARACTER)
          (0x03000000:NameValue):reversal_cd   = 'N' (CHARACTER)
          (0x01000000:Name     ):reversal_date = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):source        = 'MMS' (CHARACTER)
          (0x03000000:NameValue):trans_ref_num = '02876436' (CHARACTER)
          (0x03000000:NameValue):descry        = 'Jnl to transfer Test  refund t' (CHARACTER)
          (0x03000000:NameValue):currency_cd   = 'USD' (CHARACTER)
          (0x03000000:NameValue):curr_rt_type  = 'CRRNT' (CHARACTER)
          (0x03000000:NameValue):cur_effdt     = '07152011' (CHARACTER)
          (0x01000000:Name     ):cur_exchng_rt = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
        )
        (0x01000000:Name):body   = (
          (0x03000000:NameValue):business_unit    = 'AAAA' (CHARACTER)
          (0x01000000:Name     ):journal_line     = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):ledger           = 'ACTUALS' (CHARACTER)
          (0x03000000:NameValue):account          = '532003' (CHARACTER)
          (0x03000000:NameValue):deptid           = '560' (CHARACTER)
          (0x01000000:Name     ):product          = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):project_id       = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):affiliate        = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):statistic_code   = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):currency_cd      = 'USD' (CHARACTER)
          (0x03000000:NameValue):monetary_amount  = '         7560.00' (CHARACTER)
          (0x01000000:Name     ):statistic_amount = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):jrnl_ln_ref      = '0000000549' (CHARACTER)
          (0x03000000:NameValue):line_descr       = '/ Jnl to transfer Test  refund' (CHARACTER)
          (0x01000000:Name     ):cur_rt_type      = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):cur_exchng_rt    = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):foreign_amount   = '         7560.00' (CHARACTER)
        )
        (0x01000000:Name):body   = (
          (0x03000000:NameValue):business_unit    = 'AAAA' (CHARACTER)
          (0x01000000:Name     ):journal_line     = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):ledger           = 'ACTUALS' (CHARACTER)
          (0x03000000:NameValue):account          = '511001' (CHARACTER)
          (0x03000000:NameValue):deptid           = '560' (CHARACTER)
          (0x01000000:Name     ):product          = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):project_id       = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):affiliate        = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):statistic_code   = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):currency_cd      = 'USD' (CHARACTER)
          (0x03000000:NameValue):monetary_amount  = '        -1890.00' (CHARACTER)
          (0x01000000:Name     ):statistic_amount = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):jrnl_ln_ref      = '0000000549' (CHARACTER)
          (0x03000000:NameValue):line_descr       = '322865/1 Jnl to transfer Test ' (CHARACTER)
          (0x01000000:Name     ):cur_rt_type      = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):cur_exchng_rt    = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):foreign_amount   = '        -1890.00' (CHARACTER)
        )
        (0x01000000:Name):body   = (
          (0x03000000:NameValue):business_unit    = 'AAAA' (CHARACTER)
          (0x01000000:Name     ):journal_line     = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):ledger           = 'ACTUALS' (CHARACTER)
          (0x03000000:NameValue):account          = '511001' (CHARACTER)
          (0x03000000:NameValue):deptid           = '560' (CHARACTER)
          (0x01000000:Name     ):product          = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):project_id       = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):affiliate        = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):statistic_code   = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):currency_cd      = 'USD' (CHARACTER)
          (0x03000000:NameValue):monetary_amount  = '        -1890.00' (CHARACTER)
          (0x01000000:Name     ):statistic_amount = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):jrnl_ln_ref      = '0000000549' (CHARACTER)
          (0x03000000:NameValue):line_descr       = '322861/1 Jnl to transfer Test ' (CHARACTER)
          (0x01000000:Name     ):cur_rt_type      = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):cur_exchng_rt    = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):foreign_amount   = '        -1890.00' (CHARACTER)
        )
        (0x01000000:Name):body   = (
          (0x03000000:NameValue):business_unit    = 'AAAA' (CHARACTER)
          (0x01000000:Name     ):journal_line     = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):ledger           = 'ACTUALS' (CHARACTER)
          (0x03000000:NameValue):account          = '511001' (CHARACTER)
          (0x03000000:NameValue):deptid           = '560' (CHARACTER)
          (0x01000000:Name     ):product          = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):project_id       = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):affiliate        = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):statistic_code   = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):currency_cd      = 'USD' (CHARACTER)
          (0x03000000:NameValue):monetary_amount  = '        -1890.00' (CHARACTER)
          (0x01000000:Name     ):statistic_amount = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):jrnl_ln_ref      = '0000000549' (CHARACTER)
          (0x03000000:NameValue):line_descr       = '323005/1 Jnl to transfer Test ' (CHARACTER)
          (0x01000000:Name     ):cur_rt_type      = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):cur_exchng_rt    = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):foreign_amount   = '        -1890.00' (CHARACTER)
        )
        (0x01000000:Name):body   = (
          (0x03000000:NameValue):business_unit    = 'AAAA' (CHARACTER)
          (0x01000000:Name     ):journal_line     = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):ledger           = 'ACTUALS' (CHARACTER)
          (0x03000000:NameValue):account          = '511001' (CHARACTER)
          (0x03000000:NameValue):deptid           = '560' (CHARACTER)
          (0x01000000:Name     ):product          = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):project_id       = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):affiliate        = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):statistic_code   = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):currency_cd      = 'USD' (CHARACTER)
          (0x03000000:NameValue):monetary_amount  = '        -1890.00' (CHARACTER)
          (0x01000000:Name     ):statistic_amount = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):jrnl_ln_ref      = '0000000549' (CHARACTER)
          (0x03000000:NameValue):line_descr       = '322875/1 Jnl to transfer Test ' (CHARACTER)
          (0x01000000:Name     ):cur_rt_type      = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):cur_exchng_rt    = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):foreign_amount   = '        -1890.00' (CHARACTER)
        )
      )
      (0x01000000:Name     ):record                           = (
        (0x01000000:Name):header = (
          (0x03000000:NameValue):business_unit = 'AAAA' (CHARACTER)
          (0x03000000:NameValue):journal_id    = '001983' (CHARACTER)
          (0x03000000:NameValue):journal_date  = '07182011' (CHARACTER)
          (0x03000000:NameValue):ledger_group  = 'ACTUALS' (CHARACTER)
          (0x03000000:NameValue):reversal_cd   = 'N' (CHARACTER)
          (0x01000000:Name     ):reversal_date = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):source        = 'MMS' (CHARACTER)
          (0x03000000:NameValue):trans_ref_num = '02876858' (CHARACTER)
          (0x03000000:NameValue):descry        = 'KCE and UGL refunds to transfe' (CHARACTER)
          (0x03000000:NameValue):currency_cd   = 'USD' (CHARACTER)
          (0x03000000:NameValue):curr_rt_type  = 'CRRNT' (CHARACTER)
          (0x03000000:NameValue):cur_effdt     = '07182011' (CHARACTER)
          (0x01000000:Name     ):cur_exchng_rt = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
        )
        (0x01000000:Name):body   = (
          (0x03000000:NameValue):business_unit    = 'AAAA' (CHARACTER)
          (0x01000000:Name     ):journal_line     = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):ledger           = 'ACTUALS' (CHARACTER)
          (0x03000000:NameValue):account          = '532003' (CHARACTER)
          (0x03000000:NameValue):deptid           = '560' (CHARACTER)
          (0x01000000:Name     ):product          = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):project_id       = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):affiliate        = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):statistic_code   = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):currency_cd      = 'USD' (CHARACTER)
          (0x03000000:NameValue):monetary_amount  = '          910.02' (CHARACTER)
          (0x01000000:Name     ):statistic_amount = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):jrnl_ln_ref      = '0000000549' (CHARACTER)
          (0x03000000:NameValue):line_descr       = '/ KCE and UGL refunds to trans' (CHARACTER)
          (0x01000000:Name     ):cur_rt_type      = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):cur_exchng_rt    = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):foreign_amount   = '          910.02' (CHARACTER)
        )
        (0x01000000:Name):body   = (
          (0x03000000:NameValue):business_unit    = 'AAAA' (CHARACTER)
          (0x01000000:Name     ):journal_line     = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):ledger           = 'ACTUALS' (CHARACTER)
          (0x03000000:NameValue):account          = '531001' (CHARACTER)
          (0x03000000:NameValue):deptid           = '560' (CHARACTER)
          (0x01000000:Name     ):product          = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):project_id       = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):affiliate        = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):statistic_code   = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):currency_cd      = 'USD' (CHARACTER)
          (0x03000000:NameValue):monetary_amount  = '         -666.10' (CHARACTER)
          (0x01000000:Name     ):statistic_amount = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):jrnl_ln_ref      = '0000000549' (CHARACTER)
          (0x03000000:NameValue):line_descr       = '432237/1 KCE and UGL refunds t' (CHARACTER)
          (0x01000000:Name     ):cur_rt_type      = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):cur_exchng_rt    = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):foreign_amount   = '         -666.10' (CHARACTER)
        )
        (0x01000000:Name):body   = (
          (0x03000000:NameValue):business_unit    = 'AAAA' (CHARACTER)
          (0x01000000:Name     ):journal_line     = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):ledger           = 'ACTUALS' (CHARACTER)
          (0x03000000:NameValue):account          = '521001' (CHARACTER)
          (0x03000000:NameValue):deptid           = '560' (CHARACTER)
          (0x01000000:Name     ):product          = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):project_id       = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):affiliate        = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):statistic_code   = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):currency_cd      = 'USD' (CHARACTER)
          (0x03000000:NameValue):monetary_amount  = '          -57.24' (CHARACTER)
          (0x01000000:Name     ):statistic_amount = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):jrnl_ln_ref      = '0000000549' (CHARACTER)
          (0x03000000:NameValue):line_descr       = '432257/1 KCE and UGL refunds t' (CHARACTER)
          (0x01000000:Name     ):cur_rt_type      = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):cur_exchng_rt    = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):foreign_amount   = '          -57.24' (CHARACTER)
        )
        (0x01000000:Name):body   = (
          (0x03000000:NameValue):business_unit    = 'AAAA' (CHARACTER)
          (0x01000000:Name     ):journal_line     = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):ledger           = 'ACTUALS' (CHARACTER)
          (0x03000000:NameValue):account          = '521001' (CHARACTER)
          (0x03000000:NameValue):deptid           = '560' (CHARACTER)
          (0x01000000:Name     ):product          = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):project_id       = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):affiliate        = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):statistic_code   = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):currency_cd      = 'USD' (CHARACTER)
          (0x03000000:NameValue):monetary_amount  = '         -186.68' (CHARACTER)
          (0x01000000:Name     ):statistic_amount = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):jrnl_ln_ref      = '0000000549' (CHARACTER)
          (0x03000000:NameValue):line_descr       = '581716/1 KCE and UGL refunds t' (CHARACTER)
          (0x01000000:Name     ):cur_rt_type      = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x01000000:Name     ):cur_exchng_rt    = (
            (0x03000000:NameValue)http://www.w3.org/2001/XMLSchema-instance:type = 'xs:string' (CHARACTER)
          )
          (0x03000000:NameValue):foreign_amount   = '         -186.68' (CHARACTER)
        )
      )
    )
  )
)


Actual Output from flow:
Code:

HAAAA 001982    07152011ACTUALS   NMMS02876436Jnl to transfer Test  refund tUSDCRRNT07152011
LAAAA ACTUALS   532003560       USD         7560.000000000549/ Jnl to transfer Test  refund         7560.00
LAAAA ACTUALS   511001560       USD        -1890.000000000549322865/1 Jnl to transfer Test         -1890.00
LAAAA ACTUALS   511001560       USD        -1890.000000000549322861/1 Jnl to transfer Test         -1890.00
LAAAA ACTUALS   511001560       USD        -1890.000000000549323005/1 Jnl to transfer Test         -1890.00
LAAAA ACTUALS   511001560       USD        -1890.000000000549322875/1 Jnl to transfer Test         -1890.00
HAAAA 001983    07182011ACTUALS   NMMS02876858KCE and UGL refunds to transfeUSDCRRNT07182011
LAAAA ACTUALS   532003560       USD          910.020000000549/ KCE and UGL refunds to trans          910.02
LAAAA ACTUALS   531001560       USD         -666.100000000549432237/1 KCE and UGL refunds t         -666.10
LAAAA ACTUALS   521001560       USD          -57.240000000549432257/1 KCE and UGL refunds t          -57.24
LAAAA ACTUALS   521001560       USD         -186.680000000549581716/1 KCE and UGL refunds t         -186.68


Expected Output:
Code:

HAAAA 001982    07152011ACTUALS   N        MMS02876436Jnl to transfer Test  refund tUSDCRRNT07152011               
LAAAA       ACTUALS   532003560                                    USD         7560.00                0000000549/ Jnl to transfer Test  refund                              7560.00
LAAAA       ACTUALS   511001560                                    USD        -1890.00                0000000549322865/1 Jnl to transfer Test                              -1890.00
LAAAA       ACTUALS   511001560                                    USD        -1890.00                0000000549322861/1 Jnl to transfer Test                              -1890.00
LAAAA       ACTUALS   511001560                                    USD        -1890.00                0000000549323005/1 Jnl to transfer Test                              -1890.00
LAAAA       ACTUALS   511001560                                    USD        -1890.00                0000000549322875/1 Jnl to transfer Test                              -1890.00
HAAAA 001983    07182011ACTUALS   N        MMS02876858KCE and UGL refunds to transfeUSDCRRNT07182011               
LAAAA       ACTUALS   532003560                                    USD          910.02                0000000549/ KCE and UGL refunds to trans                               910.02
LAAAA       ACTUALS   531001560                                    USD         -666.10                0000000549432237/1 KCE and UGL refunds t                              -666.10
LAAAA       ACTUALS   521001560                                    USD          -57.24                0000000549432257/1 KCE and UGL refunds t                               -57.24
LAAAA       ACTUALS   521001560                                    USD         -186.68                0000000549581716/1 KCE and UGL refunds t                              -186.68
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Sep 18, 2012 5:16 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Well at least you used [c o d e ] tags. Congrats.

Kimbert is the expert on parsing.

IIRC you should be using the parse command, not the assignment '=' operator.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Tue Sep 18, 2012 6:35 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Looks like you've done everything right, but the output is wrong. I'm struggling to find the time to investigate this myself, so if you need a prompt solution then it may be time to open a PMR. Alternatively, if you wait a couple of days I'll probably find the time to try it out.
Back to top
View user's profile Send private message
damianharvey
PostPosted: Tue Sep 18, 2012 3:38 pm    Post subject: Reply with quote

Acolyte

Joined: 05 Aug 2003
Posts: 59
Location: Sydney, Australia

When I actually use this schema in a flow that maps from another datatype to DFDL for serialization it all works. So it really only seems to be an issue when taking the DFDL XML instance and converting that (which wouldn't usually happen in practice).
Back to top
View user's profile Send private message
smuktineni
PostPosted: Thu Apr 18, 2013 11:52 am    Post subject: source for RecordFixLengthFieldFormat schema Reply with quote

Apprentice

Joined: 28 Aug 2003
Posts: 33
Location: Omaha

damianharvey,
I have been trying with CobolDataFormat instead of RecordFixLengthFieldFormat. The only issue I have is with the null/empty elements not being padded.
Can you please direct which sample you got the RecordFixLengthFieldFormat schema from?

Thanks in advance
Back to top
View user's profile Send private message Yahoo Messenger
kimbert
PostPosted: Fri Apr 19, 2013 12:57 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

If you are modelling a COBOL data format, then you should be using the Cobol data format. If you need to tweak the null handling and/or the padding behaviour then you can do that without changing to a different format block.

Can you share some details please
- what is the value in the message tree?
- what are the DFDL settings for that element?
- what output are you getting?
- what output do you want to see?
Back to top
View user's profile Send private message
smuktineni
PostPosted: Fri Apr 19, 2013 6:57 am    Post subject: Reply with quote

Apprentice

Joined: 28 Aug 2003
Posts: 33
Location: Omaha

Input for the flow is XML from Webservices and output is fixed length format. Same schema is used for both Input and Output.

Schema (has DFDL settings)

Code:
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/example" xmlns:tns="http://www.example.org/example"
  elementFormDefault="qualified" xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/"
  xmlns:dfdlCobolFmt="http://www.ibm.com/dfdl/CobolDataDefinitionFormat"
  xmlns:ibmSchExtn="http://www.ibm.com/schema/extensions" xmlns:ibmDfdlExtn="http://www.ibm.com/dfdl/extensions"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema">

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

  <xsd:complexType name="Header">
    <xsd:sequence dfdl:sequenceKind="ordered">
      <xsd:element dfdl:length="30" id="STRUCTU" name="Structure" type="xsd:string" />
      <xsd:element dfdl:length="10" id="ACTION" name="Action" type="xsd:string" />
      <xsd:element dfdl:length="20" id="CRCRUS" name="UserWhoCreated" type="xsd:string" />
      <xsd:element dfdl:length="26" id="CRCRTS" name="UserWhoCreatedTS" type="xsd:string" />
      <xsd:element dfdl:length="20" id="CRUPUS" name="UserWhoUpdated" type="xsd:string" />
      <xsd:element dfdl:length="26" id="CRUPTS" name="UserWhoUpdatedTS" type="xsd:string" />
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="Entity">
    <xsd:sequence dfdl:sequenceKind="ordered">
      <xsd:element dfdl:length="50" id="CRCRPN" name="businessName" type="xsd:string" />
      <xsd:element dfdl:length="50" id="CRADR1" name="address1" type="xsd:string" />
      <xsd:element default="                                                  " dfdl:fillByte="%SP;" dfdl:length="50" dfdl:lengthKind="explicit" dfdl:nilKind="literalCharacter" dfdl:nilValue="%SP;" dfdl:textStringPadCharacter="%SP;" id="CRADR2" minOccurs="0" name="address2" nillable="true" type="xsd:string">
      </xsd:element>
      <xsd:element dfdl:length="40" id="CRCITY" name="city" type="xsd:string" />
      <xsd:element dfdl:length="3" id="CRSTE" name="state" type="xsd:string" />
      <xsd:element dfdl:length="3" id="CRCTRY" name="country" type="xsd:string" />
      <xsd:element dfdl:length="11" id="CRPSCD" name="postalCode" type="xsd:string" />
      <xsd:element dfdl:length="15" id="CRCNPH" name="phone" type="xsd:string" />
      <xsd:element dfdl:length="10" id="CRCNPE" name="phoneExtension" type="xsd:string" />
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="CustomerRequest">
    <xsd:sequence dfdl:sequenceKind="ordered">
      <xsd:element dfdl:lengthKind="implicit" id="ReqHeader" name="Header" nillable="false" type="tns:Header" />
      <xsd:element dfdl:lengthKind="implicit" id="corprate" name="corporateEntity" nillable="false" type="tns:Entity" />
    </xsd:sequence>
  </xsd:complexType>

  <xsd:annotation>
    <xsd:appinfo source="http://www.ogf.org/dfdl/">
      <dfdl:format binaryFloatRep="ieee" byteOrder="bigEndian" encoding="UTF-8" ignoreCase="yes" leadingSkip="0" lengthKind="explicit" lengthUnits="characters" occursCountKind="implicit" ref="dfdlCobolFmt:CobolDataFormat" representation="text" separatorPolicy="suppressed" textNumberPadCharacter="0" textPadKind="padChar" textStringJustification="left" textStringPadCharacter="%SP;" textZonedSignStyle="asciiStandard" trailingSkip="0" useNilForDefault="yes"/>
    </xsd:appinfo>
  </xsd:annotation>

  <xsd:element dfdl:lengthKind="implicit" ibmSchExtn:docRoot="true" name="CreateCustomerRequest" type="tns:CustomerRequest" />
</schema>


Input, note that address2 as empty

Code:
   <soapenv:Header/>
   <soapenv:Body>
      <com:CreateCustomerRequest>
         <Header>
            <Structure>CURABCD</Structure>
            <Action>CREATE</Action>
            <UserWhoCreated>TEST</UserWhoCreated>
            <UserWhoCreatedTS>0001-01-01-00.00.00.000000</UserWhoCreatedTS>
            <UserWhoUpdated>TEST</UserWhoUpdated>
            <UserWhoUpdatedTS>0001-01-01-00.00.00.000000</UserWhoUpdatedTS>
         </Header>
         <corporateEntity>
            <businessName>Marine International</businessName>
            <address1>One Marine drive</address1>
            <address2/>
            <city>Fort Lauradel</city>
            <state>FL</state>
            <country>USA</country>
            <postalCode>32111</postalCode>
         </corporateEntity>


Expected Output
Code:
CURABCD                       CREATE    TEST                0001-01-01-00.00.00.000000                    0001-01-01-00.00.00.0000000Marine International                              One Marine drive                                                                                    Fort Lauradel                           FL USA32111


Actual Output (total length is 50 characters less due to address2)
Code:
CURABCD                       CREATE    TEST                0001-01-01-00.00.00.000000                    0001-01-01-00.00.00.0000000Marine International                              One Marine drive                                  Fort Lauradel                           FL USA32111
Back to top
View user's profile Send private message Yahoo Messenger
smuktineni
PostPosted: Fri Apr 19, 2013 7:02 am    Post subject: Reply with quote

Apprentice

Joined: 28 Aug 2003
Posts: 33
Location: Omaha

Apologize should have mentioned it earlier

Environment is
Platform: 'Windows 7 Professional', '6.1 build 7601 Service Pack 1', 'AMD64'
WebSphere Message Broker Toolkit - Version: 8.0.0.2, Build id: 8.0.0.2-20130322-1723
Broker version: '8002' (build 'S800-FP02')
Back to top
View user's profile Send private message Yahoo Messenger
smuktineni
PostPosted: Fri Apr 19, 2013 7:20 am    Post subject: Reply with quote

Apprentice

Joined: 28 Aug 2003
Posts: 33
Location: Omaha

Some more details...
Flow is
SoapInput-->Compute to extract payload --> Compute (transform from XML to DFDL) --> Trace -->....

In transformation Compute, ESQL has (there is more, I can send it offline if required)
Code:
SET OutputRoot.DFDL = InputRoot.XMLNSC;


Also tried below with no benefit
Code:
SET OutputRoot.DFDL.ns:CustomerRequest = InputRoot.XMLNSC.ns:CustomerRequest;


Trace output for ${Root} is

Code:
Message: ( ['SOAPRoot' : 0xf5ba3b0]
  (0x01000000:Name):Properties = ( ['MQPROPERTYPARSER' : 0xd2e24a0]
    (0x03000000:NameValue):MessageSet             = '' (CHARACTER)
    (0x03000000:NameValue):MessageType            = '' (CHARACTER)
    (0x03000000:NameValue):MessageFormat          = '' (CHARACTER)
    (0x03000000:NameValue):Encoding               = 546 (INTEGER)
    (0x03000000:NameValue):CodedCharSetId         = 1208 (INTEGER)
    (0x03000000:NameValue):Transactional          = FALSE (BOOLEAN)
    (0x03000000:NameValue):Persistence            = FALSE (BOOLEAN)
    (0x03000000:NameValue):CreationTime           = GMTTIMESTAMP '2013-04-19 14:54:19.393999' (GMTTIMESTAMP)
    (0x03000000:NameValue):ExpirationTime         = -1 (INTEGER)
    (0x03000000:NameValue):Priority               = 0 (INTEGER)
    (0x03000000:NameValue):ReplyIdentifier        = X'000000000000000000000000000000000000000000000000' (BLOB)
    (0x03000000:NameValue):ReplyProtocol          = 'SOAP-AXIS2' (CHARACTER)
    (0x03000000:NameValue):Topic                  = NULL
    (0x03000000:NameValue):ContentType            = 'text/xml;charset=UTF-8' (CHARACTER)
    (0x03000000:NameValue):IdentitySourceType     = '' (CHARACTER)
    (0x03000000:NameValue):IdentitySourceToken    = '' (CHARACTER)
    (0x03000000:NameValue):IdentitySourcePassword = '' (CHARACTER)
    (0x03000000:NameValue):IdentitySourceIssuedBy = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedType     = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedToken    = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedPassword = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedIssuedBy = '' (CHARACTER)
  )
  (0x01000000:Name):MQMD       = ( ['MQHMD' : 0xd14bf30]
    (0x03000000:NameValue):Version        = 2 (INTEGER)
    (0x03000000:NameValue):Format         = 'MQSTR   ' (CHARACTER)
    (0x03000000:NameValue):ApplOriginData = 'XXXX' (CHARACTER)
    (0x03000000:NameValue):BackoutCount   = 5 (INTEGER)
    (0x03000000:NameValue):Encoding       = 546 (INTEGER)
    (0x03000000:NameValue):CodedCharSetId = 1208 (INTEGER)
    (0x03000000:NameValue):Transactional  = FALSE (BOOLEAN)
    (0x03000000:NameValue):Persistence    = 0 (INTEGER)
    (0x03000000:NameValue):PutDate        = DATE '2013-04-19' (DATE)
    (0x03000000:NameValue):PutTime        = GMTTIME '14:54:19.393999' (GMTTIME)
    (0x03000000:NameValue):Expiry         = -1 (INTEGER)
    (0x03000000:NameValue):Priority       = 0 (INTEGER)
    (0x03000000:NameValue):CorrelId       = X'000000000000000000000000000000000000000000000000' (BLOB)
  )
  (0x01000000:Name):DFDL       = ( ['dfdl' : 0xd01cd40]
    (0x01000000:Name)http://www.example.org/example/CustomerRequest = (
      (0x01000000:Name     ):Header                = (
        (0x03000000:NameValue):Structure        = 'CURABCD' (CHARACTER)
        (0x03000000:NameValue):Action           = 'CREATE' (CHARACTER)
        (0x03000000:NameValue):UserWhoCreated   = 'TEST' (CHARACTER)
        (0x03000000:NameValue):UserWhoCreatedTS = '0001-01-01-00.00.00.000000' (CHARACTER)
        (0x03000000:NameValue):UserWhoUpdated   = '' (CHARACTER)
        (0x03000000:NameValue):UserWhoUpdatedTS = '0001-01-01-00.00.00.000000' (CHARACTER)
      )
      (0x01000000:Name     ):corporateEntity       = (
        (0x03000000:NameValue):businessName   = 'Marine International' (CHARACTER)
        (0x03000000:NameValue):address1       = 'One Marine drive' (CHARACTER)
        (0x01000000:Name     ):address2       =
        (0x03000000:NameValue):city           = 'Fort Lauradel' (CHARACTER)
        (0x03000000:NameValue):state          = 'FL' (CHARACTER)
        (0x03000000:NameValue):country        = 'USA' (CHARACTER)
        (0x03000000:NameValue):postalCode     = '32111' (CHARACTER)
      )
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DFDL Pad on serialize
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.