Append Line to Flat File.

Rashmi

Member
I'm trying to create a fixed width file. I'm reading some data from 811 tables and creating the string to be written to the file. To write to the file, I'm using "Append Line to Flat File" (B76B0220). This writes the string and at the end of the string it appends a new line character. Secondly, the it starts the second line immediately instead of the next line.
I have saved the file in UTF-8 and also made an entry in P93081 to use UTF8 encoding.
Anyone faced this issue where the new line character gets written at the end of line?
I have also tried using ANSI and UNICODE, but doesn't work.
confused.gif
 
u have a typical unicode issue. The business function that u are using needs to be uni code compatible.

run codechangecom utility...
 
Hello Rashmi,

You can very well try the BSFN B34A1010 to write a fixed line in flat file.This works really great without any issue.

Thanks

Ram.M

EOne 8.10 AS400

Rashmi <[email protected]> wrote:
I'm trying to create a fixed width file. I'm reading some data from 811 tables and creating the string to be written to the file. To write to the file, I'm using "Append Line to Flat File" (B76B0220). This writes the string and at the end of the string it appends a new line character. Secondly, the it starts the second line immediately instead of the next line.
I have saved the file in UTF-8 and also made an entry in P93081 to use UTF8 encoding.
Anyone faced this issue where the new line character gets written at the end of line?
I have also tried using ANSI and UNICODE, but doesn't work.
 
Hi!
I agree on using the flat file operation business functions, however if you need to do something special e.g. write a non-unicode file you can write your own business functions using the unicode API's.
Somebody attached a good documentation on them about 1.5 years ago (Thanks it was the right time for me).
Regards:
Gergely Pongrácz
e-Best, Hungary
 
If you can create this file in a UBE (not sure if that is the case) then you can use DB Output from the UBE to write lines to the .txt file and as long as the file is in the same place with the same name it will always append the new lines to the bottom very nicely. Must be able to use the UBE though. Just a thought.
 
Hi,

Have you tried using Write One Line To Flat File ?

Thanks,

Joydeep
 
Rash,

What platform are you using? I can offer you a solution - but you need to put your platform in your signature... so I know whether it will work for you or not.

(db)
 
Back
Top