I'm guessing that you're on the Mac platform. What version of the OS are you
using? I've never had to go through that many files (I've handled the
daily/weekly type imports) at one time. My guess would be that an
AppleScript would be needed to provide a folder listing which could be
stored to an array. From there, loop through the array with a <@FOR> action.
I'm not an AppleScript expert.

One word of warning, if there is too much you might see Tango or your
browser time out. You might need to create a temporary table (or database in
FM lingo) to store the results at a certain point in the routine. So your
complete task might involve: step 1 - remove as much unnessary data as
possible and save to database, step 2 - take records from temp database and
parse into fields and resave in temp database, step 3 - insert into final
database.

The other option is to process only a few records at a time. I had a problem
like this and what I did was to create a small routine within my TAF file
which processed a certain number of records but kept track of where it
started and stopped each time and presented me with a result page with a
'Process Next xx' button. Similar to a 'Next x' in a search but this was
used for an insert. This allowed me to process a large block of records
without Tango timing out on me, and without having me keep track of what I'd
processed. If you used the AppleScript approach I mentioned earlier, stored
the results to an array with a user scope, you'd be able to do the same
thing. Set up a form page with a button and a hidden field. Make the value
for the hidden field equal to a <@CALC> tag that adds x to an <@ARG> (with x
being how many records are to be processed in a single submit). Make the
<@ARG> value the START attribute in your <@FOR START='<@ARG abc>' STOP='x'>.

This message is getting lengthy. If you need more assistance, I'd be happy
to discuss this further offline.

Hope this helps,

Steve Smith

Skadt Information Solutions
Office: (519) 624-4388
GTA:    (416) 606-3885
Fax:    (519) 624-3353
Cell:   (416) 606-3885
Email:  [EMAIL PROTECTED]
Web:    http://www.skadt.com


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Nicholas Froome
> Sent: September 11, 2002 8:57 AM
> To: Multiple recipients of list witango-talk
> Subject: RE: Witango-Talk: parsing text files [OT]
>
>
> Steve
>
>
> >I've played around with similar things myself. If you know that there is
> >only one 'record' per HTML page, then you might try using <@REPLACE> to
> >remove the garbage (<TABLE...> tags, <B> tags, etc.) by making the
> >REPLACESTR=''. You might need to use the <@SUBSTRING> tag to
> assist, making
> >the START attribute equal to a <@FIND> tag that looks for a
> string that you
> >know exists. For example, if you use this on a variable that contains the
> >HTML source file from your first example below:
>
> Many thanks for the pointers. Any advice on how to loop through a
> folder of files? I'm really weak on interacting with the OS and
> files. I'm OK within Tango (pretty much) but have lived in a cosy
> Filemaker & Tango world for a long time...
>
>
> ________________________________________________________________________
> TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
>                 with unsubscribe witango-talk in the message body
>

________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to