cancel
Showing results for 
Search instead for 
Did you mean: 

Adding EOF to XML file without using FCC

Former Member
0 Kudos

Hello Experts,

I have a simple File to File scenario with source and target files being XML and simple mapping (No content conversion necessary). The issue which I face is described below:

File is written by receiver File Adapter on the unix system, a third party Unix script tries to read the file and faces problems which they report is because the file is not ended correctly. When we try to open the files using vi editor, we also get a warning: [Last line is not complete].

As a temporary solution the script is making sure the line is ended correctly. Can you advice me how from PI side I can make sure that the file ends properly. I was thinking to write a shell script and add it as a OS post processing command but I am not sure whether that will work and whether that is the best solution.

Also the file name is generated dynamically using time stamps in the receiver side. Version of PI is 7.0 SP16

Best Regards,

Pratik

Accepted Solutions (0)

Answers (1)

Answers (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

When PI sends target file to file,it definely wellformed XML,anyway you are sending XML file.

If you are nor using any mapping,,just copying file from one to other,then problem with test data,may be source data doesnot have EOF tag.

check/test in message mapping,it gives valid xml structures in out put,then problem with your data.

Regards,

Raj

Former Member
0 Kudos

Hi Raj,

Its not that I am not using mapping. I just mentioned its a direct one to one mapping which is being done and not a complex mapping or a content conversion in file adapter. After the mapping, I can see that XML is well formed but still I face the problem I mentioned above.

Best Regards,

Pratik

Edited by: pratik_du on Apr 5, 2010 11:23 AM

Former Member
0 Kudos

Hi Raj,

Its not that I am not using mapping. I just mentioned its a direct one to one mapping which is being done and not a complex mapping or a content conversion in file adapter. After the mapping I can see that XML is well formed but still I face the problem I mentioned above.

Best Regards,

Pratik

former_member200962
Active Contributor
0 Kudos

Can you confirm that encoding used is not creating any problem....if file is viewed properly in SXMB_MONI (payload after mapping) and if the same is not viewable, then due to some encoding problem the data has got manipulated.

Former Member
0 Kudos

Hi Abhishek,

The content can be viewed properly in SXMB_MONI. The file type is Binary, so I don't think there might be issues related to encoding here. I can also see the correct content in message monitoring on the AE. So till that point also its fine.

I can also view the file which is written but when I open with vi it says [Last line not complete] and so the problem is end of file doesnot happen correctly.

Best Regards,

Pratik