From: | Neil Bothwick |
Date: | 28 Jun 2001 at 09:13:42 |
Subject: | Re: how do batch process 350 html files? |
Terry Chadban said,
> Hello Neil,
>> Does HTTX give the same column layout each time? If so, you can read
>> each line of the file output by HTTX and use PARSE to split it into
>> its component parts.
>>
>> e.g. if each line is laid out like
>>
>> Item 1 Item 2 Item 3 Item 4
>>
> Nah, that would be too easy! :-)
> The output is in a form similar to this:
> NAME1
> Personal details, each separated by a couple of spaces
> DATE FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6 COMMENTS
> DATE FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6 COMMENTS
> DATE FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6 COMMENTS
> DATE FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6 COMMENTS
> -------------------------------------------------------------
> NAME2
> Personal details
> DATE FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6 COMMENTS
> DATE FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6 COMMENTS
> DATE FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6 COMMENTS
> DATE FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6 COMMENTS
> DATE FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6 COMMENTS
> DATE FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6 COMMENTS
> -------------------------------------------------------------
> NAME3
> etc. The personal details info is not in a columnal format, which
> doesn't help, and the comments field can vary greatly in length.
The length of the comments field is unimportant, because it's the last
field. Are there always at least a couple of spaces between columns, and
never double spaces within any data item? If so you could use
parse var line item1 ' ' item2 ' ' etc.
Alternatively, if there are column headers for each table, you could
read the header line to work out to the column layout.
> At
> the moment I am undecided as to try to import the data into a database
> program - I have SBase and a couple of registered shareware progs,
> into TurboCalc - I have v3.5 - or to bite the bullet and try to write
> an ARexx prog from scratch.
You'd still need a script to massage the data before you could import
it.
Cheers
Neil
Before they invented drawing boards, what did they go back to?
ARexx mailing list - No flames, no overquoting, no crossposting.
Unsub: Blank mail to mailto:arexx-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/