I'm trying to write lines into a text file so that it can be read by another script. Here's a sample:

IF $NAV=1 ;this is just a flag saying NAV has been selected.
WriteLine(1, "NAV" + Chr(13) + Chr(10))
ENDIF
As I have numerous if statements the file will have up to 10 lines eg:
NAV
AS400
.
.
Notes

Here's the problem. By having the Chr()'s I'm putting in carage returns and making the file readable. However, by doing this the last value written into the file will have a carrage return after it, which causes a "Open file error". ?????

Jezz