the codes syntax is not checking the error as wanted.

change lines:
OPEN(2,$OutputFile,5)
WHILE @ERROR = 0
$Line = READLINE(1)

to:
OPEN(2,$OutputFile,5)
$Line = READLINE(1)
WHILE @ERROR = 0

and add
$Line = READLINE(1)

between '? "loop"' and 'loop':
? "Loop"
$Line = READLINE(1)
LOOP

that should fix one error...

cheers,
_________________________
!

download KiXnet