Loop / Remove (OpenInsight 32-Bit)
At 29 APR 2010 11:25:13PM Colin Rule wrote:
I am processing a large file using loop/remove, and it is blazingly fast. My problem is the file contains @RM, @FM, @VM, @SVM, @TM and @lots-of-other-things.
I would like just to get @RM delimited fields, as my file contains a series of items delimited by @RM (converted from CRLF) as stored in a DOS file.
It would be good if the REMOVE statement syntax could allow for:
Remove variable From string At column USING DELIM Setting flagFailing that for a future release, any thoughts on how I can extract one item at a time from the file.
Colin
At 30 APR 2010 12:54AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Suspecting we're misunderstanding and therefore embarking on egg sucking lessons
ptr = 1 Loop nextVal = string ptr, @Rm ptr = Col2() + 1 While Len( nextVal ) * do stuff RepeatWorld leaders in all things RevSoft
At 30 APR 2010 08:28AM Richard Hunt wrote:
Basically it does. The "FLAG" variable in your sentence is set to a value according to the delimiter that was found.
Value=0 when end of string.
Value=1 when @RM was found.
At 30 APR 2010 08:43AM Simon Wilmot wrote:
To clarify what Richard is saying … the following code extracts the bits between the @rm's
Cheers,
Simon
String = '1' : @vm : '2' : @fm : '3' : @rm : '4' : @fm : '5' : @vm : '6' : @fm : '7' : @rm : '8' : @fm : '9' : @vm : 'A' : @fm : 'B' : @rm : 'C' : @fm : 'D'
Column = 0
Str =
Pos = 1 Loop Remove Text from String at zColumn setting Flag Temp = Str Temp := Text Str = Temp Until Text =
If Flag=1 then Pos += 1Repeat
At 30 APR 2010 01:18PM Warren Auyong wrote:
The method Sprezzatura outlines is the fastest (and easiest) from my tests.
At 10 MAY 2010 09:33PM Colin Rule wrote:
Thanks Sprezz, it works well.
My 11 minute import is now down to 1 minute.
Colin