Steve Massey wrote:
>
> Thanks for trying to help so far, I think i need to explain a
> bit more. The file contains varying data, empty, numeric, text
> data is processed in between the ordered numbers say ..1 2 3 4,
> the only
> thing I can be certain of is,
>
> 1)  line 3 will contain number one(start of data set 1) - when
> checked I can process it's data

So, do you need to /make sure/ that the third record is just '1'?

> 2)  there will be a count of 3 or 4 to number 2 (start of data
> set 2) - when checked I can process it's data

So you need to accumulate the intervening information lines for
processing?

> 3)  above line repeats to end

Yep.

> 4)  end is known when number 4 has been found and processed

Ah. So there are exactly four records?

> my idea was to process the file confirming each number found,
> and pushing the line numbers into an array for further
> processing, I just have a mental block on how to deal with the
> varying increments

It's becoming clearer. But I think my previous code would cope
with what you describe. Have you tried it? The one thing that you
haven't confirmed is that the records containing the sequence
numbers are recognisable by containing just numeric characters. Is
that right?

What that code didn't do is to check that there were either three
or four information lines (I coded just a 'die' at more than four)
and that there are exactly four blocks of data records. All that
means is that invalid file contents won't necessarily show an
error. Adding code to gather the data is trivial.

Let us know if we're guessing correctly!

Rob







-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to