Skip to Content
author's profile photo Former Member
Former Member

File Content Conver at Receiver End

Hi,

I have source is XML message this xml message i want to convert as a .dat file format in Receiver end using File Content Conversion.

Find the Source XML Message

-


in source some of the xml elements i am getting spaces

<ns0:ORD_MT >

<ORD_HD>

<H001>

<H001_01>TEST</H001_01>

<H001_02 />

<H001_03 />

<H001_04>0080000659</H001_04>

<H001_05 />

</H001>

<H002>

<H002_01>TEST1</H002_01>

<H002_02>0000000000</H002_02>

<H002_03 />

<H004_04 />

</H002>

</ORD_HD>

<ORD_LD>

<L001>

<L001_01>L001</L001_01>

<L001_02>0000000000</L001_02>

<L001_03 />

<L001_04 />

</L001>

<L002>

<L002_01>LLLL</L002_01>

<L002_02>0000000000</L002_02>

<L002_03 />

<L002_04 />

<L002_05 />

</L002>

</ORD_LD>

</ns0:ORD_MT>

Target i want only Field fixed valus with out using any field separator,

EX : H001_01ValueH001_02ValueH001_03Value...

H002_01ValueH002-02Value...

L001_01ValueL001_02Value..

L002_01ValueL002_02Value...

Record Structure i gave : ORD_HD,H001,H002,ORD_LD,L001,L002

H001.fieldFixedLengths : 4,10,5 (Here i gave H001 lenths)

H001.endSeparator :'nl'

H002.fieldFixedLengths : 4,10,5 (Here i gave H001 lenths)

H002.endSeparator :'nl'

L001.fieldFixedLengths : 4,10,5 (Here i gave H001 lenths)

L001.endSeparator :'nl'

L002.fieldFixedLengths : 4,10,5 (Here i gave H001 lenths)

L002.endSeparator :'nl'

I am getting the below error in Adapter Framework

ORD_LD.fieldSepartor is missing like that..

Please can you tell me any one i want to generate in target end fixed lenth file with out .dat file..

Thanks for your Help.

Regards,

venu.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 05, 2006 at 04:53 AM

    Hi Venu,

    Try this Configuration:

    RecordSet: ORD_HD,H001,H002,ORD_LD,L001,L002

    ORD_HD.fieldSeparator '0'

    ORD_HD.endSeparator 'nl'

    H001.fieldSeparator '0'

    H001.endSeparator 'nl'

    H002.fieldSeparator '0'

    H002.endSeparator 'nl'

    L001.fieldSeparator '0'

    L001.endSeparator 'nl'

    L002.fieldSeparator '0'

    L002.endSeparator 'nl'

    ORD_LD.fieldSeparator '0'

    ORD_LD.endSeparator 'nl'

    Try this and get back. It worked for the sample structure that u have posted. Do get back if u have any issues.

    PS: fieldSeparator '0'(zer0)indicates no fieldseparator useful in fixedlengthfiles.

    Regards,

    Sudharshan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 05, 2006 at 08:16 AM

    Hi Venu,

    Just to clarify, does your structure look as below....

    <ns0:ORD_MT >

    --<ORD_HD>

    -


    <H001>

    -


    <H001_01>TEST</H001_01>

    -


    <H001_02 />

    -


    <H001_03 />

    -


    <H001_04>0080000659</H001_04>

    -


    <H001_05 />

    -


    </H001>

    -


    <H002>

    -


    <H002_01>TEST1</H002_01>

    -


    <H002_02>0000000000</H002_02>

    -


    <H002_03 />

    -


    <H004_04 />

    -


    </H002>

    --</ORD_HD>

    --<ORD_LD>

    -


    <L001>

    -


    <L001_01>L001</L001_01>

    -


    <L001_02>0000000000</L001_02>

    -


    <L001_03 />

    -


    <L001_04 />

    -


    </L001>

    -


    <L002>

    -


    <L002_01>LLLL</L002_01>

    -


    <L002_02>0000000000</L002_02>

    -


    <L002_03 />

    -


    <L002_04 />

    -


    <L002_05 />

    -


    </L002>

    --</ORD_LD>

    </ns0:ORD_MT>

    If it is so, Since your structure has more than 2 levels of Hierarchy, you will not be able to do content conversion. Content conversion can be done upto only 2 evels of Hierarchy to the best of my Knowledge.

    Anyways if it is so then the only possible solution that i can suggest is to change the structure as either of the 2 below and then do content conversion...

    <ns0:ORD_MT >

    -


    <H001>

    -


    <H001_01>TEST</H001_01>

    -


    <H001_02 />

    -


    <H001_03 />

    -


    <H001_04>0080000659</H001_04>

    -


    <H001_05 />

    -


    </H001>

    -


    <H002>

    -


    <H002_01>TEST1</H002_01>

    -


    <H002_02>0000000000</H002_02>

    -


    <H002_03 />

    -


    <H004_04 />

    -


    </H002>

    -


    <L001>

    -


    <L001_01>L001</L001_01>

    -


    <L001_02>0000000000</L001_02>

    -


    <L001_03 />

    -


    <L001_04 />

    -


    </L001>

    -


    <L002>

    -


    <L002_01>LLLL</L002_01>

    -


    <L002_02>0000000000</L002_02>

    -


    <L002_03 />

    -


    <L002_04 />

    -


    <L002_05 />

    -


    </L002>

    </ns0:ORD_MT>

    or

    <ns0:ORD_MT >

    --<ORD_HD>

    -


    <H001_01>TEST</H001_01>

    -


    <H001_02 />

    -


    <H001_03 />

    -


    <H001_04>0080000659</H001_04>

    -


    <H001_05 />

    -


    <H002_01>TEST1</H002_01>

    -


    <H002_02>0000000000</H002_02>

    -


    <H002_03 />

    -


    <H004_04 />

    --</ORD_HD>

    --<ORD_LD>

    -


    <L001_01>L001</L001_01>

    -


    <L001_02>0000000000</L001_02>

    -


    <L001_03 />

    -


    <L001_04 />

    -


    <L002_01>LLLL</L002_01>

    -


    <L002_02>0000000000</L002_02>

    -


    <L002_03 />

    -


    <L002_04 />

    -


    <L002_05 />

    --</ORD_LD>

    </ns0:ORD_MT>

    Which of these structures to use depends on your logic and need and also do note the fact that changing the structure will bring in a change to your mapping logic. So do make a wise call on the same....

    Regards,

    Abhy

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.