>SET SAFETY OFF
>I follow your advice, however it doesn't work. SO I attach my program and see what you can give me some idea about that.
>
>******** Source code **********
>
>line = 1
>l_string = space(134)
>
>store fopen(CHK_PATH) to file_handle
>store fseek(file_handle,0,2) to ifp_size
>store fseek(file_handle,0) to ifp_top
>
>set device to print
>set printer to &OUTPUT
>
>do while .not. feof(file_handle)
> l_string = fgets(file_handle,ifp_size)
I think your problem lies here - as I remember, FPW had a maximum string variable length (somewhere in the range of 64K; it's been a while since I used FPW.) You might try creating a temporary .DBF that contains a memo field, appending a blank record, then populating the memo using APPEND MEMO. Use the memo field rather than a variable for your operation. since memo fields are limited only by disk space.
> if .not. empty(l_string) .and. rep_type = "S"
> line_code = substr(l_string,1,3)
> feed_code = substr(l_string,4,1)
> if .not. empty(line_code)
> line = val(line_code)
> else
> line = line + val(feed_code)
> endif
> prn_line = 0
> do while prn_line < line
> ?
> prn_line = prn_line + 1
> enddo
>* @ line, 0 say substr(l_string,5,134)
> ? substr(l_string,5,134)
> else
> if .not. feof(file_handle)
> ?
>* line = line + 1
> ? substr(l_string,1,134)
>* @ line, 0 say substr(l_string,1,134)
> endif
> endif
>enddo
>
>set print to
>set device to screen
>=fclose(file_handle)
>
>*********** End of program *************
>
>Thanks a lot!!