OK, I appreciate the help you guys are giving. I've changed the script to:

code:
IF OPEN(1,$InputFile) = 2
CLS
? "File " + $InputFile + " does not exist that can be found."
ENDIF
OPEN(2,$OutputFile,5)
WHILE @ERROR = 0
$Line = READLINE(1)
IF SUBSTR($Line, 1, 3) = "SDQ"
$Segment = Split($Line, "*")
$Pos = 0
FOR EACH $Element in $Segment
$Pos = $Pos + 1
SELECT
CASE $Pos=3 OR $Pos=5 OR $Pos=7 OR $Pos=9 OR $Pos=11 OR $Pos=13 OR $Pos=15 OR $Pos=17 OR $Pos=19 OR $Pos=21
$nul = WRITELINE(2, $Element + CHR(13) + Chr(10))
ENDSELECT
NEXT
ENDIF
? "Loop"
LOOP
? @ERROR+' - '+@SERROR
CLOSE(2)
CLOSE(1)

The error feedback is "-300" when I run it. Looking it up, this means:

300 The oplock request is denied. ERROR_OPLOCK_NOT_GRANTED

What in the heck is all that about?