olliwest
15th May 2008, 12:04
hello together,
i like to read my jobdata table (ttaad500) an set the content in different variables. But i get only the first row.
e.g. i have 4 Jobs in the table, but i get four times the first line.
function get.job.infos()
{
file.rm("jobinfos.txt")
path.id2 = "jobinfos.txt"
i=1
db.retry.point()
select count(ttaad500.cjob):number_jobs
from ttaad500
selectdo
endselect
if (number_jobs > 0) then
while(i <= number_jobs)
select ttaad500.cjob:jobname,ttaad500.desc:desc,ttaad500.user:user
from ttaad500
selectdo
endselect
seq.id2 = seq.open(path.id2,"a")
seq.write(str$(jobname),256,seq.id2)
seq.write(str$(desc),256,seq.id2)
seq.write(str$(user),256,seq.id2)
i=i+1
seq.close(seq.id2)
endwhile
endif
}
how can i read the table row by row?
can everbody help me
thanks olli
i like to read my jobdata table (ttaad500) an set the content in different variables. But i get only the first row.
e.g. i have 4 Jobs in the table, but i get four times the first line.
function get.job.infos()
{
file.rm("jobinfos.txt")
path.id2 = "jobinfos.txt"
i=1
db.retry.point()
select count(ttaad500.cjob):number_jobs
from ttaad500
selectdo
endselect
if (number_jobs > 0) then
while(i <= number_jobs)
select ttaad500.cjob:jobname,ttaad500.desc:desc,ttaad500.user:user
from ttaad500
selectdo
endselect
seq.id2 = seq.open(path.id2,"a")
seq.write(str$(jobname),256,seq.id2)
seq.write(str$(desc),256,seq.id2)
seq.write(str$(user),256,seq.id2)
i=i+1
seq.close(seq.id2)
endwhile
endif
}
how can i read the table row by row?
can everbody help me
thanks olli