System Resources Exceeded

S

SirPoonga

What would cause this error?

I have a VBA script that is taking a text file dumped from a mainframe
and converting it to tables. Each line of the text file is a record
that could be of different types. The fields are specified in a
layout at what character the field starts and ends in the line. I have
the record type and layout information stored in a table. The table
has fields - record_type, field_id, field_start, field_end,
field_description. Pretty self explanatory.

The basic algorithm goes as such.

Form to input text file location/name and where the record type starts
and ends.
Loop through the each line of the file.
Extract record type
Run a query to grab the record layout information from the layout table
based on record type. (Should I make some sort of datatype to store
this ahead of time so I don't query as much?)
Go through the recordset and grab the field_id, field_start, field_end.
Extract the field from the line.
Fields stored in a comma delimitted string.
Once all fields are extracted execute an INSERT into the appropiate
table.
Repeat until done.

The text file I have to go through is about 330megs, almost 1 million
lines.
I'm thinking the only way I could really save resources is by not
querying so much and storing the record layout info in some type of
data structure.
 
T

Todd Shillam

Try increasing your virtual memory--I have seen similar errors while
performing memory intense tasks.

Todd
 
S

SirPoonga

TransferText seems like it would only work if each line had the same
fixed width format. But that's not the case. Each line is some type
of record. Each record type can have its own layout. The only field
that is constant between record types is the record type field that
identifies what type of record it is. For example, a sales history
record might have a description at 32 to 45. While a product base
record will have a description at 65 to 83.
I am running it on a 3.4Ghz, 1g mem, 3-5g virtual mem machine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top