on 07-06-2008 10:19 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.