cancel
Showing results for 
Search instead for 
Did you mean: 

variable message length without field separator to file receiver adapter

hashtag_siva
Explorer
0 Kudos

Hi,

I have a XML document as below

<MT_O_FF>

<ROW>

<HEADER> </HEADER>

<QMGR> </QMGR>

<MESSAGE> TEST MESSAGE </MESSAGE>

</ROW>

</MT_O_FF>

I know the field lengths of <HEADER> and QMGR but MESSAGE has variable length data. We don't want field separator between HEADER, QMGR and MESSAGE. The file should be created as below (text file)

TEST MESSAGE

The above blanks in front of TEST MESSAGE data needs to be there in the file. The problem I am facing is as <MESSAGE> is variable length and the file should not have field separator, is there any way we can create text file using file adapter?

If I use xml.fieldFixedLengths as below, as long as data in MESSAGE is less then 40000 then the file is created with data. If the length is more then 40000 then the file is getting created but the data in MESSAGE is getting truncated. The maximum length adapter allows me to use 40000.

xml.fieldFixedLengths=10,20,40000

xml.fieldNames=HEADER,QMGR,MESSAGE

xml.fieldTooShortHandling=ignore

Thanks in advance for your help.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,

the parameter fieldTooShortHandling = ignore should solve your purpose.

Ignore means that the system applies the value completely, regardless of it being too long. Subsequent columns are moved correspondingly.

Thanks

Swarup

Answers (0)