willian.ueno
19th July 2019, 16:28
Hi,
I am try to save a tmp file with more than 10000 characters but It just saving 4080 characters, I am using the standard function text.write.

text.write("tdvvr036.tret.o", language$, "", "", "", "",
tgroup.o, editopt.o,
l.file.temp.o)

The text group is set to maximum number of columns and lines.

How can I solve this problem?

Tks.

mark_h
19th July 2019, 20:29
Is the text.write returning the correct number of lines? I know sometimes I had to use seq.flush on file before I closed it. That is what popped into mind when I read this.

mark_h
19th July 2019, 20:35
Please do not post duplicate threads. Pick a forum - post there and if you want it moved you can ask a moderator. Sometimes will we move them where we think best.

willian.ueno
19th July 2019, 22:36
Is the text.write returning the correct number of lines? I know sometimes I had to use seq.flush on file before I closed it. That is what popped into mind when I read this.

Mark, one more information, in this tmp file we are working with XML structure.

We had The same problem using seq.flush.

Tks.

mark_h
22nd July 2019, 15:03
Well one of the things I did at one point was use text to buff instead of text.write. So I would put the text into a buffer and process it. Basically like this - since this was part of our conversion to oracle, I am not sure if the first time I ran into a issue was with the text truncating or note. Been a couple of years since I wrote the extract code.


ret = text.to.buf("tiitm001.txta","2",900,buf)
if ret > 0 then
t.numrecs = ret
else
return
endif
for i = 1 to t.numrecs
ret = seq.puts(buf(1,i), output.itm)
endfor
rc = seq.flush(output.itm)
rc = seq.close(output.itm)