on 08-04-2008 10:31 AM
All,
I want to write a file with its maximum length..lets say if my output is having only one char(1),but its max length is 15,,i want to have 14 spaces and and 1.
am using following parameters.
XML.fieldNames
XML.fieldFixedLengths
XML.fixedLengthTooShortHandling-Cut
When you specify
XML.fieldFixedLengths - 15
XML.fixedLengthTooShortHandling-Cut
u ll get 14 spaces when input is 1 char.
No need of a UDF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
XML.fixedLengthTooShortHandling-Cut is used when length of element exceeds than that defined in fieldFixedLengths
If your value is of length 1 and maxlength in fieldFixedLengths is 15 then you need to pad this value with leading spaces in mapping
in mapping use UDF, if length is < 15 then
lengthDiff = maxLength - strLength;
for(int cnt=0;cnt<lengthDiff;cnt++){
strInput = " "+strInput;
}
return strInput;
Pass input string as parameter to this UDF
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
The parameters you are using are sufficient for the required output with blank spaces of 14....
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 |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.