SandraDiehl
29th March 2007, 23:27
I'm having some slight issues with using the text.write function. Could use any advise please.
This is what I am doing: I have an ASCII input file that contains an item and description. I am reading it into my script and selecting from tiitm001 where the items are equal. The goal is to write the description from the file to
tiitm001.txtp (AKA The Purchase Text). We have text group "text" defined in the system, align.item is the item read in and buf.dsca is the description. Then I want to copy the text I created in the English lang to Spanish lang.
This what my code looks like:
db.retry.point()
select tiitm001.*
from tiitm001 for update
where tiitm001._index1 = {:align.item}
order by tiitm001._index1
selectdo
ret.num = text.write("tiitm001.txtp", "2", "ITEMLOAD",
"ITM001.TXTP", buf.item, "", "text",
"3", buf.dsca)
ret.num = text.copy.language(tiitm001.txtp, "2", "5")
db.update(ttiitm001, db.retry)
endselect
commit.transaction()
When I run this I get tiitm001.txtp has a value other than zero but my ret.num = 0 which from what I have read means no lines were created since the return value should reflect how many lines were written.
Any ideas what I am doing wrong???
Thanks:confused:
This is what I am doing: I have an ASCII input file that contains an item and description. I am reading it into my script and selecting from tiitm001 where the items are equal. The goal is to write the description from the file to
tiitm001.txtp (AKA The Purchase Text). We have text group "text" defined in the system, align.item is the item read in and buf.dsca is the description. Then I want to copy the text I created in the English lang to Spanish lang.
This what my code looks like:
db.retry.point()
select tiitm001.*
from tiitm001 for update
where tiitm001._index1 = {:align.item}
order by tiitm001._index1
selectdo
ret.num = text.write("tiitm001.txtp", "2", "ITEMLOAD",
"ITM001.TXTP", buf.item, "", "text",
"3", buf.dsca)
ret.num = text.copy.language(tiitm001.txtp, "2", "5")
db.update(ttiitm001, db.retry)
endselect
commit.transaction()
When I run this I get tiitm001.txtp has a value other than zero but my ret.num = 0 which from what I have read means no lines were created since the return value should reflect how many lines were written.
Any ideas what I am doing wrong???
Thanks:confused: