Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

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 flag

Failing 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
Repeat

The Sprezzatura Group

The Sprezzatura Blog

World 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 += 1

Repeat


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

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/be5cbc114abecec2852577150012ca0e.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1