DO WHILE freadln(in_handle, @in_line, LINE_SIZE) .AND. row < 25

    * first see if we have a matching pair of delimiters
    mismatched = .F.
    start_fld = at(chr(174), in_line)

    gets_this_line = 0

    * for every field on this line ...
    DO WHILE start_fld != 0 .AND. !mismatched

        end_fld = at(chr(175), substr(in_line, start_fld))
        IF end_fld != 0
            field_name = alltrim(substr(in_line, start_fld + 1, ;
                                        end_fld - 2))
            gets_this_line = gets_this_line + 1
            get_cols[gets_this_line] = start_fld
            get_names[gets_this_line] = field_name

            * now replace delimiters and field name with spaces
            in_line = stuff(in_line, start_fld, end_fld, space(end_fld))
            start_fld = at(chr(174), in_line)
        ELSE
            mismatched = .T.
        ENDIF

    ENDDO

    out_line = "@ " + IIF(row < 10, " ", "") + ltrim(str(row)) + ;
               ", 0  SAY " + "'" + in_line + "'"
    fwrite(out_handle, out_line + CRLF)

    * now issue all GETs we saved
    FOR get_num = 1 TO gets_this_line

        out_line = "@ " + IIF(row < 10, " ", "") + ltrim(str(row)) + ;
                   ", " + ltrim(str(get_cols[get_num])) + " GET " + ;
                   get_names[get_num]
        fwrite(out_handle, out_line + CRLF)

    NEXT

    row = row + 1

ENDDO
