skommu
11th October 2002, 17:54
Hi,
I am trying to export the Data to Ascii / Report for other needs of third party package for the items having signal code "PRE" or "ROU" . Once this ascii file was exported then I want to update the signal code with "ORT". It means my script has to perform two tasks.
1. It has to export data for the items of signal code "PRE" or " ROU" .
2. Update the tiitm001.csig(signal code) to "ROU".
With the below script I can able to update to "ORT" but in the Ascci/Report I am getting a message " No data with in the selection".
Function read.main.table()
{
select tiedm100.eitm
from tiedm100
where tiedm100.exdt = 0
and tiedm100.indt > 0
and tiedm100.eitm between :item.f and :item.t
selectdo
select tiitm001.csig, tiitm001.item
from tiitm001 for update
where tiitm001.item = :tiedm100.eitm
and (titim001.csig = "PRE" or tiitm001.csig = "ROU")
and tiitm001._index1 inrange {:item.f}
and {:item.t}
selectdo
tiitm001.csig = "ORT"
db.update(tiitm001,db.retry)
endselect
commit.transaction()
endselect
}
I am trying to export the Data to Ascii / Report for other needs of third party package for the items having signal code "PRE" or "ROU" . Once this ascii file was exported then I want to update the signal code with "ORT". It means my script has to perform two tasks.
1. It has to export data for the items of signal code "PRE" or " ROU" .
2. Update the tiitm001.csig(signal code) to "ROU".
With the below script I can able to update to "ORT" but in the Ascci/Report I am getting a message " No data with in the selection".
Function read.main.table()
{
select tiedm100.eitm
from tiedm100
where tiedm100.exdt = 0
and tiedm100.indt > 0
and tiedm100.eitm between :item.f and :item.t
selectdo
select tiitm001.csig, tiitm001.item
from tiitm001 for update
where tiitm001.item = :tiedm100.eitm
and (titim001.csig = "PRE" or tiitm001.csig = "ROU")
and tiitm001._index1 inrange {:item.f}
and {:item.t}
selectdo
tiitm001.csig = "ORT"
db.update(tiitm001,db.retry)
endselect
commit.transaction()
endselect
}