crazy thing

lcross

Registered User.
Local time
Yesterday, 21:48
Joined
Aug 30, 2005
Messages
39
i've been ask to think of some solution to this problem but i'm no way near of it.

i have a txt file (ascii) with aprox. 1845000 lines.
the code is something like this
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Date: 02-12-2004 Time: 11:06:24

Job Number: 2542
Job Name: al
Priority: Normal

User Name: msescudeiro
Customer:
Account: 1341000
Distribution:
Notes:

--------------------------------------------------------------------------------

Original Filename: C-0884_Vers_E.TIF

recycled paper
Used Area: 0
Plotted Area: 0

Media: paper
Used Area: 4977
Plotted Area: 4977

Media: film
Used Area: 0
Plotted Area: 0

Media: vellum
Used Area: 0
Plotted Area: 0

Operation Count
Mirror: 0
Rotate: 0
Zoom: 0
Stamp: 0
Fold: 38

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
"
i need to have a table like this
"
Date Name Dep Acount
25/01/05/ me mine 001
"

how can i do this?????????????
PS: sorry this is a big and confused post.
 
l,

There are a billion ways to get data, some easier than others.
It isn't difficult to parse a file like that, but what exactly
are you trying to do?

You mention that you need ONE table with 4-columns. What are
you doing with the bulk of the file? Do you really only want
to grab a series of Dates, UserNames, Departments and Accounts?

Need more info.

Wayne
 
hope i can explain this

this is a printer log .
what i need is to get users accounts and print areas to make a report.
this report is a little confuse to me cause a print job start with +++++++ but it refers to several prints that are divided by --------
i have an excell macro to this but it fails after the 65000 line in excell.
this report has 1480000 lines.
 
Last edited:
lcross,

Can you post a better sample of the data. The last sample didn't have
department. We can do this in VBA.

Wayne
 
i need to retrieve date; job number;job name;user;account for each job
plus a job can have several files
and for this files i need the plotted area value

someting like this:
task 2540 date 02-12-2004 job_name IT_CAT_050 User vitor Account: 9999999 Plotted Area: 3225

hope this is clear enough, i'm going nuts...

this is a copy of part of the log:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Date: 02-12-2004 Time: 10:14:11

Job Number: 2540
Job Name: IT_CAT_050
Priority: Normal

User Name: vitor
Customer: exterior
Account: 9999999
Distribution:
Notes: não alterar este trabalho

--------------------------------------------------------------------------------

Original Filename: 10002000398-00_EC-140

recycled paper
Used Area: 0
Plotted Area: 0

Media: paper
Used Area: 2304
Plotted Area: 3225

Media: film
Used Area: 0
Plotted Area: 0

Media: vellum
Used Area: 0
Plotted Area: 0

Operation Count
Mirror: 0
Rotate: 0
Zoom: 0
Stamp: 0
Fold: 38

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Date: 02-12-2004 Time: 10:30:06

Job Number: 2541
Job Name: cantenaria
Priority: Normal

User Name: J Sousa
Customer:
Account: 1702043
Distribution:
Notes:

--------------------------------------------------------------------------------

Original Filename: 10002000297(E-7554).TIF

recycled paper
Used Area: 0
Plotted Area: 0

Media: paper
Used Area: 8841
Plotted Area: 11416

Media: film
Used Area: 0
Plotted Area: 0

Media: vellum
Used Area: 0
Plotted Area: 0

Operation Count
Mirror: 0
Rotate: 0
Zoom: 0
Stamp: 0
Fold: 38

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Date: 02-12-2004 Time: 11:06:24

Job Number: 2542
Job Name: al
Priority: Normal

User Name: msescudeiro
Customer:
Account: 1341000
Distribution:
Notes:

--------------------------------------------------------------------------------

Original Filename: C-0884_Vers_E.TIF

recycled paper
Used Area: 0
Plotted Area: 0

Media: paper
Used Area: 4977
Plotted Area: 4977

Media: film
Used Area: 0
Plotted Area: 0

Media: vellum
Used Area: 0
Plotted Area: 0

Operation Count
Mirror: 0
Rotate: 0
Zoom: 0
Stamp: 0
Fold: 38

--------------------------------------------------------------------------------

Original Filename: 45009_1.TIF

recycled paper
Used Area: 0
Plotted Area: 0

Media: paper
Used Area: 2500
Plotted Area: 3523

Media: film
Used Area: 0
Plotted Area: 0

Media: vellum
Used Area: 0
Plotted Area: 0

Operation Count
Mirror: 0
Rotate: 0
Zoom: 0
Stamp: 0
Fold: 38

--------------------------------------------------------------------------------

Original Filename: 45009_1.TIF

recycled paper
Used Area: 0
Plotted Area: 0

Media: paper
Used Area: 2500
Plotted Area: 3523

Media: film
Used Area: 0
Plotted Area: 0

Media: vellum
Used Area: 0
Plotted Area: 0

Operation Count
Mirror: 0
Rotate: 0
Zoom: 0
Stamp: 0
Fold: 38

--------------------------------------------------------------------------------

Original Filename: 45009_1.TIF

recycled paper
Used Area: 0
Plotted Area: 0

Media: paper
Used Area: 2500
Plotted Area: 3523

Media: film
Used Area: 0
Plotted Area: 0

Media: vellum
Used Area: 0
Plotted Area: 0

Operation Count
Mirror: 0
Rotate: 0
Zoom: 0
Stamp: 0
Fold: 38

--------------------------------------------------------------------------------

Original Filename: 45009_1.TIF

recycled paper
Used Area: 0
Plotted Area: 0

Media: paper
Used Area: 2500
Plotted Area: 3523

Media: film
Used Area: 0
Plotted Area: 0

Media: vellum
Used Area: 0
Plotted Area: 0

Operation Count
Mirror: 0
Rotate: 0
Zoom: 0
Stamp: 0
Fold: 38

--------------------------------------------------------------------------------

Original Filename: 45009_1.TIF

recycled paper
Used Area: 0
Plotted Area: 0

Media: paper
Used Area: 2500
Plotted Area: 3523

Media: film
Used Area: 0
Plotted Area: 0

Media: vellum
Used Area: 0
Plotted Area: 0

Operation Count
Mirror: 0
Rotate: 0
Zoom: 0
Stamp: 0
Fold: 38

--------------------------------------------------------------------------------

Original Filename: 45009_1.TIF

recycled paper
Used Area: 0
Plotted Area: 0

Media: paper
Used Area: 2500
Plotted Area: 3523

Media: film
Used Area: 0
Plotted Area: 0

Media: vellum
Used Area: 0
Plotted Area: 0

Operation Count
Mirror: 0
Rotate: 0
Zoom: 0
Stamp: 0
Fold: 38

--------------------------------------------------------------------------------

Original Filename: 45009_1.TIF

recycled paper
Used Area: 0
Plotted Area: 0

Media: paper
Used Area: 2500
Plotted Area: 3523

Media: film
Used Area: 0
Plotted Area: 0

Media: vellum
Used Area: 0
Plotted Area: 0

Operation Count
Mirror: 0
Rotate: 0
Zoom: 0
Stamp: 0
Fold: 38

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
I agree with Wayne, and a second thought here, when you get everything the way you want it, you might concider archiving the older data. hth.
 
Dumb question here is this query for a form or a report? I personally, if possible, would like to see and play with a sample dbase with just these records in it.
 
i got very little

this is for a report but the only thing i've got is the import table from the txt file (1840000 records)
but i'll give a example db for you to play
 

Attachments

lcross,

The sample DB doesn't give you the info in a useful format.

I'll put together a sample later today.

Wayne
 
lcross,

I had to define some real tables. The initial example just looks like the
input file.

You can grab some nice info from the input file, you might as well get all the
fields while you're reading it.

Could be nice to add a "browse" button to find the file. The Search Facility
here has examples.

Anyway, the sample should get you started.

Wayne
 

Attachments

thanks a lot i'll see if i can reach the next step of evolution .... LOL.
 
there are a few questions a liked to ask:
the tables have already all the data or are beeing fill when you open the form??
also i tryed to change this
"Open "C:\Print.Log" For Input As #1" to "Open "C:\my location\my file.Log" For Input As #1" and nothing!!!
Can you give me another hand here????
 
lcross,

The tables are already filled out.

When the code runs, the first thing that it does is delete the
current contents of the tables.

As to the file opening ... if it doesn't return an error, the
file must be opening. Can you cut and paste your code?

Wayne
 
what i really needed was to do the separation of the log file into the tables, like you did.
Like chosing the file to open (log.txt ) and import the data into those 2 tables. after that i only need to do a report.
can you help me with these one too??
tks
 
lcross,

Like I said in an earlier post - we can add a browser. Use the Search Facility
here, there are examples.

What is your DB doing now? Are you opening the file? Can you post what
you have?

Wayne
 
wayne:
the bd is deleting the records but then returns:
"update without addnew or edit" and debugs "
Case "Job Nu"
rstJob!JobNumber = Trim(Mid(buf, 13))"
But i dont think i need a browser funct. cause the file is allways on the same path and name.
but i do need to import the file and split it into those 2 tables like you did, can you show me a code to do that, cause if so i can do rest on my own (i think):)
thank again
 
L,

Either the input file is different than my sample OR you have transcribed
the code and forgot the .Addnew

Can you post the DB?

Wayne
 
This is the db after runing the code (the tables as no records, the code deleted all records).
this is your original db, i just change the path of the file to import, run the code and it stops with that error.
 

Attachments

L,

I just downloaded the Database, made a teste.log file from post #6 in
this thread, and it processed just fine. Is your teste.log file different
from post #6 here?

Can you attach a sample of your real file if it is different? Something
must be different about the file.

Wayne
 

Users who are viewing this thread

Back
Top Bottom