cancel
Showing results for 
Search instead for 
Did you mean: 

How do we remove carriage return at end of file after FCC?

LouieReyes
Explorer
0 Kudos

PI 7.4 - I've implemented a standard File Receiver FCC but I was wondering if there is a way to avoid the last carriage return at the of file after FCC? I tried several endSeparator like 'nl', '0x0A','0x0D' and '0' but it does not satisfy the requirement.

Sample:

1 Recordset LF

2 Recordset LF

---extra line--- How to remove this?

Accepted Solutions (0)

Answers (4)

Answers (4)

LouieReyes
Explorer
0 Kudos

This is solved. I created a custom adapter module to remove the last line from the file/plain output before sending to target system. XSLT does not help because I need to change the text file (file receiver) not the XML (mapping part).

former_member190293
Active Contributor
0 Kudos

Hi Orland!

One of the straight-forward ways is to build target file using XSLT or java mapping directly.

Regards, Evgeniy.

LouieReyes
Explorer
0 Kudos

The requirement should be like this:

1 Recordset LF

2 Recordset--end here- with no additional LF or CR.

Any response from the community would be much appreciated.

former_member190293
Active Contributor
0 Kudos

Hi Orland!

Did you try to use MessageTransformBean instead of FCC? Does the result stay the same?

Regards, Evgeniy.

LouieReyes
Explorer
0 Kudos

Yes I got the same results even with structxmlbean. Is this a standard behavior of content conversion? Is the only option custom module?

The requirement should be like this:

1 Recordset LF

2 Recordset--end here--

Note the record is comma separated and not a fixed length so I cant really use the absolute row therefore I can't determine the actual length.