aneesh_av
15th March 2002, 13:37
hi,
how to read "\n" and "\r" from a file; new line characters
from a file..
:)
spartacus
18th March 2002, 08:51
Some years ago I did something like that in DOS.
I had to read in "BINARY"-Mody to get this controlls.
At the moment I don't know if it is possible to open a file "BINARY" from Baan, but I hope so.
Hope that helps
spartacus
Han Brinkman
18th March 2002, 10:43
You can open it in binary mode, they even have a specific option for dos mode (t mode). Look up the seq.open function.
Han
Badre Alam
20th March 2002, 12:27
here is the actual code using which u can scan any ASCI file in a loop.
file.fp = seq.open("e:\apiupload\invadj.txt" ,"r")
if file.fp < 1 then
err = "Input File could not be opened"
return
endif
ret.code = seq.gets(data.line, 2048, file.fp)
while seq.eof(file.fp) = 0
rec.read = rec.read + 1
all.ok = true
read.record()
run.main.sess()
ret.code = seq.gets(data.line, 2048, file.fp)
endwhile
ret.code = seq.close(file.fp)
THanks
Alam Badre
alamb@dabur.com
:(