Well for starters you aren't listening to what I suggested. Secondly, you stated in your definition that your file is pipe delimited but your ENTRY() is using the default of comma. You need to do ENTRY(3,l-val,"|").
define variable x as character no-undo.
input from value( "test.txt" ).
output to value( "result.txt" ).
repeat:
import delimiter "|" ^ ^ x.
put unformatted x skip.
end.
output close.
input close.
As much as I love the 4gl... wouldn't it make more sense to use a purpose build OS utility? Like "cut"?
cut -d '|' -f 3 < test.txt
If you are going to use the 4GL then the obvious solution is something similar to:
Code:define variable x as character no-undo. input from value( "test.txt" ). output to value( "result.txt" ). repeat: import delimiter "|" ^ ^ x. put unformatted x skip. end. output close. input close.