PowerBuilder overwrite txt file to make it tab separated -
i have easy question m stack @ moment , wondering if can me out,
i need part of code in pb overwrite txt file , make tab separated.
that consider insert.txt file following format
533#0000000000007851
594#0000000000006937
36#0000000000005667
....
and want overwrite pb code , make this
533 0000000000007851
594 0000000000006937
36 0000000000005667
......
so # deleted , become tab...
i hope understand question
please m stack , appreciated
thank in advance
your answer correct simpler.
1) import file single column
2) parse values in each row looking '#' similar this:
integer li string ls_a, ls_b, ls_rowvalue li = 1 dw_import.rowcount() ls_rowvalue = dw_import.object.columnwithdata[li] ls_a = right(ls_rowvalue, pos(ls_rowvalue, "#") - 1) ls_b = mid(ls_rowvalue, pos(ls_rowvalue, "#") + 1) //put values new datawindow next dw_newvalues.saveas("c:\temp\newstuff.txt)
the default 'saveas' type text! tab separated.
Comments
Post a Comment