All,

I have been asked to do something in Access or Excel which I find
disagreeable.  Open Source is the way to go and also, PERL is more
flexible.  I might even obtain a little professional development on this.

My last post seemed to confuse folks (thanks to all who responded).  I
will try to clarify.

Machine,PurgeSuccess,PurgePrepared,PurgeStarted,PurgeCauseFaultID,PurgeModId,PurgeStopModId,ModIdJobCfg,NameJobCfg,Full_cfg,FinisherCfg,plex,PPM,PropID,AtreeNodeID,JobID,MediaID,Width,Height,Color,Weight,Caliper,Drilled,Finish,Grain,CoatingFront,CoatingBack,SW,additional_info,debuglog
1125785731,N,Y,Y,927,6,5,_2_3_4_5_6,_SFM20_IOT7_SFM7_BFM20_BFM2,_SFM20_IOT7_SFM7_BFM20_BFM2,DUAL_BFM,Simplex,120,44366,1228,392,527,279400,431800,white,75,104,FALSE,regular,y,none,none,RV0.6.5.27,,DebugMsgLog.2006_05_24.07_48_00
1125785731,Y,Y,N,1003,6,,_2_3_4_5_6,_SFM20_IOT7_SFM7_BFM20_BFM2,_SFM20_IOT7_SFM7_BFM20_BFM2,DUAL_BFM,Duplex,120,69206,75,408,29,279400,431800,white,75,104,FALSE,regular,y,none,none,RV0.6.5.27,,DebugMsgLog.2006_05_31.14_33_25A


Above is the same slice of data.  It all lines up in neat little columns
when you drop it into a spreadsheet.  Admittedly, it could be plopped
into all sorts of database programs, but I think doing the PERL thing
will make it more flexible and easier to change.

OK, so here is the task.  The first row I want to turn into variable
names. Machine, PurgeSuccess, etc.  Then with that removed the real work
happens.  The script would then request which variables I would like to
sort on or find records (rows) that contain the "matches" specified.

As an example, of how it should work, lets say I wanted to find all
records that had a specific value in the Machine column that also
contained another specific value in the Purge Success column.  The
script would parse each row to see if there were matches in the
"record".  Iterating through the entire file (could be as many as 15000
records), the matching records (complete rows) should be written to a
new CSV file with either the name created automatically or entered by
the user.

Processing
for each row:
if Machine = "blah" AND Purge Success = "Y" and PPM = "120 etc.


The original file would be left intact for another round of parsing with
different parameters.

Hope this makes it clear.  I really would like to get this put up on one
of my Linux servers so that the developers could use it to track trends
in the data.  I would just append new data to the object file as it is
available.  TRying hard to learn PERL as my first language.  Have found
the PERL doc to be excellent and I have purchased three PERL books
hoping to be able to do this mtself and support it over time.  I even
bought two Python books to research which scripting language might
handle it better.  PERL, being the senior language, should in theory
have the most capability.  Looked at Ruby too, but don't want the RAILS
overhead.

Thanks a bunch for any help and accept my apologies for the HUGE post.

Regards,

Ralph (the total noob)

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to