View Single Post
  #9  
Old 10th October 2017, 14:34
pralash pralash is offline
Senior Member
 
Join Date: Feb 2017
Posts: 217
pralash is on a distinguished road
Baan: 9.0 - DB: SQL Server - OS: Windows 2012R2
Thanks for your information...
Actually I read record from the table and also store a particular field in the text file...
But some additional value is automatically added with the end of the file as shown in the attachment... Also the records are not added one by one if I using the seq.put function...
Here is my script as follows.

function extern control.users.function()
{
file.name="c:\erpln\proj\users.txt"
file.pointer = seq.open(file.name, "w")

if file.pointer < 0 then
message("Can not find the file")
e = seq.close(file.pointer)
exit(1)
endif

select tccom200.user
from tccom200
where tccom200.stus="inactive"
selectdo
user.name=tccom200.user
seq.puts(strip$(shiftl$(user.name)),file.pointer)

selectempty

endselect
}
Can you please assist me to resolving this problem...
Thanks,
Pralash
Attached Images
File Type: png doubt-3.PNG (13.5 KB, 12 views)
Reply With Quote