BSFN to write to flat file without inserting separator characters?

pfd

Reputable Poster
I am trying to write to a text file using the BSFN B34A1010. When I write to a Windows directory it inserts 2 separator characters at the end of each line (LF and CR). I believe that if I write to the AS/400 it will insert 1 separator character. I tried using a Table conversion and that wrote the LF character at the end of each line too.

Is there a BSFN that will write to the text file without inserting any separator characters? I tried removing the separator characters using another BSFN but on Xe it does not work well.

I am trying to write to the flat file, the wire transfer information needed for French Banks, from the table F0572OW. What they require is 160 character fields written to the text file without any separator characters.


Thanks,
Matt
One World Xe SP23,Update 7,AS/400, V5R3
 
Hi Matt,

I am not sure if this will solve your problem, but you can try using database output with fixed width delimitation through a UBE. Where the output will be to an Windows Server.

Hope this helps,
 
Thanks Jeremy.
Do you know of any UBEs where database output is used?

Thanks,
Matt
One World Xe SP23,Update 7, AS/400,V5R3
 
Hi Matt,

I have only done my own, but basically what you need to do is send information from the Report Variables to <directory>\<nameofFile>.txt using database output on the section.

What it does is for every row that you process in the UBE it creates a line of text.

Also this will only work on Windows Type Server.
 
Hi Matt,

Create a 55-58 B34A1010, and remove the \n from the preceeding fpOutFile command. \n is used for end of line, new line characters. If you remove that, you won't have a new line character when you call the function.

Regards,

Mark
 
Thanks for your help Jeremy!


Thanks,
Matt
One World Xe SP23,Update 7,AS/400,V5R3
 
Mark,

Thanks for your input.
I am not a C programmer. So I would need some help. I do see a statement as follows in the BSFN

{
fprintf(fpOutFile, "%s\n", lpDS->szRecord);
}


How do I change this statement to get it to work without inserting the separator characters?

Thanks,
Matt
One World Xe, SP23,Update 7, AS/400,V5R3
 
Just remove the '\n' like this:

{
fprintf(fpOutFile, "%s", lpDS->szRecord);
}
 
Re: BSFN

Hi,
I am search for the same, Could you please send me the code, of writing into text file.
Thanks,
Rosy.
 
Back
Top