on 05-31-2007 8:11 AM
Hi All,
I am using File content conversion. My mapping is having only one field which is string. Now I dont know what will be the size (In Char ) of this string, as it is variable.
Also as we have to use FixedfieldLengths or field Separator I am using Fixed field lengths. I have randomly specified the length 500char as I know input string will not be greater than that.
But because of this 500char, even though the input string is less than that (Let us assume 100 char) while writing file it writes 100char of actuall string and 400char blank space.
Due to this(For eg) even though input file is of 7MB the out file becomes 30MB.
Which is huge difference.
I tried with trim function, and fieldcontentformatting = TRIM. But still problem exists.
Can anybody will help me to solve this problem?
Warm Regards,
Gouri
<i>Also as we have to use FixedfieldLengths or field Separator I am using Fixed field lengths</i>
>>
remove FixedfieldLengths and use fieldSeparator as 'nl'
that sud solve your problem
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can you paste the FCC parameters you are using in the adapter here.
The fieldSeparator option will not add spaces (in case there are already spaces in your target field in mapping then it will. In that case you will have to trim the spaces in the mapping) so use that option. It will work !!!!
Hi Gouri,
Thanks for the reponse. But still problem is not solved completely. When we down load the file into FTP Server, one blank line is appearing at the end of the file which is incorrect. Please see the FCC parameters in our scenario.
<b>Record Set strucure</b> Data, Header
Data.addHeaderLine 0
Data.fixedLengthTooShortHandling Cut
Data.fieldSeparator 'nl'
Header.addHeaderLine 0
Header.fieldFixedLengths 0
Header.fixedLengthTooShortHandling Cut
Header.endSeparator '0'
I think, due to Data.fieldSeparator, the cursor is going to next line which is infact a blank line. Instead the cursor should be positioned at the end of the file only.
The FCC parameter what I had used,
Structure.fieldNames DataRecord
Structure.fieldSeparator 'nl'
Structure.ProcessFieldNames fromConfiguration
These 3 parameters only I have used.
Just try with these parameters and check the file size. I think with this there should not be any difference in file size. If it is there plz let me know.
-Gouri
Hi Gouri,
Thanks for the reply.
I have used the structure.fieldSeparator 'nl' which seems to solved the problem. But strangely If I open the file in FTP Server Iam getting one extra line at end of file.
If I open the same in Windows there is no extra line ..its fine.
Actually what happens here is, after displaying the data the cursor is going to next line to print the header which is not required in our case. Hence it is appearing as a blank line. Instead If we write the header also, we r not getting any blank line.
Thanks,
Jitender & Siva
Hi,
May be you can try using trim UDF in the mapping program.
Prasad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.