Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Foxpro executable program cannot import larger ASCII fil
Message
From
14/09/1998 06:10:41
 
 
To
13/09/1998 22:44:39
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00135767
Message ID:
00136059
Views:
39
>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!!
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform