|
Rank: Newbie
Joined: 11/8/2018 Posts: 7
|
I'm using a flat file as output for one of my mappings.
At the end of the target file, on the last line with data, I get an undesired line feed. How is this avoided?
Thanks.
|
|
Rank: Advanced Member
Joined: 2/27/2009 Posts: 565
|
It depends. You probably have some fixed-length split which is putting in a line feed. It may or may not be possible to replace it with a floating split. Or, you can post-process the whole FlexText output as a string and truncate it to length() − 1.
|
|
Rank: Newbie
Joined: 11/8/2018 Posts: 7
|
I have been in contact with support and according to them the line feed is expected with my setup (it's configured as a repeatable split, "delimited (lined based)" ). I agree with that but problem is that the receiver of the file sets the rules and they don't want a line feed on the last line in the file.
Support also suggested the solution with truncation to length() − 1. Problem is that I want to generate Java code from mapping and it seems to not support post- processing?
|
|
Rank: Advanced Member
Joined: 2/27/2009 Posts: 565
|
There's no limitation against "post-processing" using Java in general.
|
|
Rank: Newbie
Joined: 11/8/2018 Posts: 7
|
Is that so? Maybe we're talking about different types of post processing.
The solution I tried was to serialize the target and manipulate it using a substring function. Error when generating Java code was: serialize (xxxx): Structures which parse or serialize strings are not supported for Java.
If MapForce have other means for post- processing can you please guide me to it? I can't find anything.
Of course it's solvable by modifying the generated Java code but what happens when we adjust the MapForce- mapping for some reason and have to re- generate the code? Chance that we miss to manually re- add the extra post- processing in code is big.
|
|
guest |