Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Out of string space" opening a big secuencial fil
#1
I have to open a 140Mby text file with 48 and 49 bytes records and rewrite a new one, with records that contain "AC" at lengh 44

I use:

OPEN "D:\FILE.TXT" FOR INPUT AS #1
OPEN "C:\CUIT\NEW.TXT FOR OUTPUT AS #2

FOR RECORD& = 1 TO 1000 REM THERE ARE NEARLIY 3M RECORDS
LINE INPUT #1 RECORD$
IF MID$(RECORD$,44,2)="AC" THEN WRITE #2 RECORD$
NEXT RECORD&


All I get is the following error:

Out of string space.

But if I replace D:\FILE.TXT (nearly 140Mby) with
C:\CUIT\PARTFILE.TXT (100Kby)

no errors occur.

Could it be that OPEN tests the file size before reading the first record ?
OPEN as any limitation in the size of a file that can open ?


Alejandro Lieber
Rosario Argentina
he command line is a vestige of an era of macho computing
Reply


Messages In This Thread
"Out of string space" opening a big secuencial fil - by alajandrolieber - 09-17-2005, 06:32 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)