on 01-22-2009 4:47 PM
Hello guys,
I have a doubt in Sender File Adapter with Content Conversion.
I have a text file like:
a,b,c,,e
I have the configuration in the adapter:
Register.fieldNames: a,b,c,d,e
Register.fieldSeparator: ,
The question I have is can I format the length of the text when i create the XML?
I woul like to create the XML like:
<Row>
<Register>
<a>a </a>
<a>b </a>
<a>c </a>
<a> </a>
<a>e </a>
</Register>
</Row>
I would like that when I create the file in Field A I have length = 4, but I have only 1 in the entry, and I want to fill the rest of the length with spaces.
I tried with FieldFixedLengths but when I test it the fields are not being formatted and take the commas as part of the field.
I know that this can be done in Receiver File Adapter, you leave for example one field of 5 length and you format it to 12 length with spaces.
Is this possible for Sender File ADapter?
Many thanks.
Regards,
Xavi.
hi,
See the example given in this bog, in this blog the string has been splited into different fields as per the field length, so you may use the same concept to get your output.
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
I hope it helps you.
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is not what I need, the weblog is for the order of the structure.
I am asking if is possible to format the input fields to some length.
Many thanks.
Xavi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I know it is possible in Receiver adapter, but there is no possibility to format the fields I take of the flat file to some length in Sender File Adapter?
Regards,
Xavi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you use either fixed length or field separator, you can not use both of them in the same CC, even in receiver adapter.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
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.