Thanks Cetin, I'll look at that and see how much it speeds it up with a large file...
>>>Tracy,
>>>I think it'd be fast.
>>>2 things confused me :
>>>1) Why do you get file size (if not for something used later in snipped code)
>>>2) m.data = FREAD(m.handle,VAL(m.size)-7)
>>>Why -7 ? Wouldn't you be reading next 167 bytes ? Or is it 167 bytes including m.header+m.size?
>>>
>>>Using do case instead of if..endif would slow down a bit but might be ignorable.
>>>
>>> DO ('p_'+m.Header) WITH m.header+m.size+m.data
>>>
>>>might be ?
>>>
>>>Cetin
>>
>>Actually, you are correct that it really is 167 bytes including m.header and m.size. that is why I pass all three values (m.header, m.size, and m.data) to the procedures.
>>
>>Although I wish I could, I cannot do ('p_'+m.header) simply because the file may contain headers that I do not trap for and there may be NO matching procedure for that header. There are literally hundreds of possible headers but I only need to capture those relevant to our system.
>
>Yes but you can still gain milliseconds that'd sum up to valuable time maybe :)
>
>
>Do case
> case ...
>...
>endcase
>
>* Replaced by :
>if seek('p_'+m.Header,'definedprocs','proclist')
> do ('p_'+m.Header) with ...
>endif
>
DefinedProcs could be included in project.
>PS: Just seeking places to speed it up w/o C coding :)
>Cetin
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"