I'd also guess that the disk is very active with page faults.

There's a programming trick I found to address this issue that uses VB's
Collection object.  The nice thing about it is that it will do it in a
few seconds...even on a 21 MB file.

Dim Account as String, C as New Collection
On Error Resume Next    'C.Add skips duplicate entries with an error
Do While Account <> "EOF"
        Account = nextentry(True)
        C.Add Account, "A" & Account  'keys must start with a letter
Loop
For Each Account In C
        Print #outfile, Account
Next Account

Uses for the Collection object come up on practically every project.

Rich McNeil
Boston Software Systems
866 653 5105
www.bostonworkstation.com
 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, August 28, 2003 12:35 PM
To: [EMAIL PROTECTED]
Subject: RE: [Talk] Text File Sizes

What seems to be happening is that it's maxing out the resources on the
CPU as 
it's processing the file.  Everything just locks up and if you look at
Task 
Manager it indicates CPU Usage at 100% and that the program is not
responding.  
However, if you let it sit, it does start to slowly make it's way down
thru the 
file.  It is also able to process ok if you "step" through the code.

I have attached a sample of the code below.  Thank you!  Kim

While Not temp = "EOF"
temp = nextentry(False)
    dup = False
    tempb = ""
    While Not tempb = "EOF" And dup = False
    tempb = nextentry(True)
    If temp = tempb Then dup = True
    Wend
If dup = False And Not temp = "EOF" And Not temp = "" Then Print
#outfile, temp
Close infile
trash = readfile

'****This is where it gets bogged down****

For x = 1 To lines + 1
    Line Input #infile, trash
Next

'******
Wend
> There isn't an intrinsic limit with file sizes in Visual Basic...can
you
> determine the nature of the hang...where it's happening, how severe it
> is, any error messages?
> 
> Rich McNeil
> Boston Software Systems
> 866 653 5105
> www.bostonworkstation.com
>  
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> [EMAIL PROTECTED]
> Sent: Wednesday, August 27, 2003 3:14 PM
> To: [EMAIL PROTECTED]
> Subject: [Talk] Text File Sizes
> 
> oops, sorry, sent this to the wrong address earlier...
> Hi All,
> 
> We are running Meditech Magic 4.9 and have a script that is fed by a
> text 
> file.  What we're finding is that it runs fine for smaller text files,
> however, 
> it hangs up on the larger text files.  It is not able to parse the
file
> (the 
> file that it hanging on is 21,479kb).  If I break it into smaller
> chunks, it 
> runs fine.  Are we limited on the size of file that we can use?
> 
> Thank you in advance for your replies!
> 
> Kim Bottcher
> Systems Analyst
> Children's Mercy Hospital
> Kansas City, MO
> 816-234-3796
> [EMAIL PROTECTED]
> 
> 
> 



Reply via email to