troubleshooting Question

Reading a Unix File

Avatar of freejaso
freejaso asked on
Visual Basic Classic
18 Comments1 Solution192 ViewsLast Modified:
I am trying to read an extremly large Unix file with the following code:

Open txtFile.Text For Input As #1
Length = LOF(1)
tmpData = Input(Length, #1)
Close #1

I am getting an run-time error because the string variable tmpData is not large enough to store the data. I cannot use the normal line input functions that vb provides because at the end of each line is just a line feed and NOT a ctr/line feed like a dos file. Also, I cannot open the file for random access because each line has a different length. Do you have any ideas how to read this file?

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 18 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 18 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros