sergio2011
Technical User
Hello,
I would like some help. I have I customer with a program in PAscal or Tpascal, i do not have access to the code that saves data of the tables in DAT format.
I am able to read the .dat files on notepad, and get within the sistem the type and dimensions of the tables, some
tables export to txt and others do not.
The problem is that I need to export to txt the tables.
I am absolut green on Pascal.
I´ve read the that is similar but he had access to the code.
How can i export to txt reading a .dat table with the next structure (NAME,type,size)
Nregistro,word, 5
Classe,string,15
Ccusto_red,string,10
Valor,real,18
Ccusto_ext,string,15
Def1,char,1
I have installed the FPC and tried to figure out how to make the export work, as the number of records is big, how do i define the types, and the arrays....
var
filegegevens: FILE OF tabel; ?????
recgegevens: tabel;
output_text: Text;
i: integer;
begin
ASSIGN(filegegevens,'c:\temp\data-log.dta');
{$I-} RESET(filegegevens) {$I+};
ASSIGN(output_text, 'c:\temp\data-log.txt');
rewrite(output_text);
read(filegegevens, recgegevens);
with recgegevens do
begin
writeln(output_text, Nregistro);
writeln(output_text, Classe);
writeln(output_text, CCusto);
writeln(output_text, Valor);
writeln(output_text, Def1);
end;
close(filegegevens);
close(output_text);
end.
Thanks in advance
I would like some help. I have I customer with a program in PAscal or Tpascal, i do not have access to the code that saves data of the tables in DAT format.
I am able to read the .dat files on notepad, and get within the sistem the type and dimensions of the tables, some
tables export to txt and others do not.
The problem is that I need to export to txt the tables.
I am absolut green on Pascal.
I´ve read the that is similar but he had access to the code.
How can i export to txt reading a .dat table with the next structure (NAME,type,size)
Nregistro,word, 5
Classe,string,15
Ccusto_red,string,10
Valor,real,18
Ccusto_ext,string,15
Def1,char,1
I have installed the FPC and tried to figure out how to make the export work, as the number of records is big, how do i define the types, and the arrays....
var
filegegevens: FILE OF tabel; ?????
recgegevens: tabel;
output_text: Text;
i: integer;
begin
ASSIGN(filegegevens,'c:\temp\data-log.dta');
{$I-} RESET(filegegevens) {$I+};
ASSIGN(output_text, 'c:\temp\data-log.txt');
rewrite(output_text);
read(filegegevens, recgegevens);
with recgegevens do
begin
writeln(output_text, Nregistro);
writeln(output_text, Classe);
writeln(output_text, CCusto);
writeln(output_text, Valor);
writeln(output_text, Def1);
end;
close(filegegevens);
close(output_text);
end.
Thanks in advance