Index
2011-12-04 18:12Sytze de Boer : Vfp and counter
2011-12-04 22:47Fred Taylor : Re: Vfp and counter
2011-12-04 23:09Sytze de Boer : Re: Vfp and counter
2011-12-05 03:50Christof Wollenhaupt : Re: Vfp and counter
2011-12-05 08:47Gérard Lochon : Re: Vfp and counter
2011-12-05 09:15Jean MAURICE : Re: Vfp and counter
2011-12-05 11:53Fred Taylor : Re: Vfp and counter
2011-12-05 12:30Jarvis, Matthew : RE: Vfp and counter
2011-12-05 12:41Stephen Russell : Re: Vfp and counter
2011-12-05 16:49MB Software Solutions, LLC : Re: Vfp and counter
Back to top
Vfp and counter

Author: Sytze de Boer

Posted: 2011-12-04 18:12:44   Link

I think it must be brain fade or something

I have tried different things but can't seem to find a solution

I have a large table that needs manipulating

Select winstoks

Go Top

mtodo=Reccount()

mdone=0

Do Case

Case Reccount()>100000

Set Odometer To 10000

Case Reccount()>10000

Set Odometer To 1000

Case Reccount()>1000

Set Odometer To 100

Otherwise

Set Odometer To 10

Endcase

Set Talk On

Set Talk Window

Scan

mdone=mdone+1

Wait Window Nowait Str(mdone)+" / "+Str(mtodo)

Do windnewpric2

Select winstoks

Endscan

Set Talk Off

Wait Clear

Set Odometer To 100

in this case the table has 81,000 records

The problem is that it chooses to freeze the wait window factor at a random

number and it looks like the system is frozen

But in fact, it is still processing

The app in fact tells you it is "not responding" but if you leave it long

enough, it will complete normally

I've also tried this with a thermometer routine, and it does the same thing

i.e. it looks like the thermometer is frozen at a particular point so

people use the task manager to abort the routine

As a second observation, the set odometer seems to have no effect

(It's monday morning here ..................)

--

Regards

Sytze de Boer

Kiss Software

--- StripMime Report -- processed MIME parts ---

multipart/alternative

text/plain (text body -- kept)

text/html

---

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/CAG1nNy-TZuCJEXxU19qF6tNVh2iPKP34XUvH4yNHu9RUG2GZQg@mail.gmail.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2011 Sytze de Boer
Back to top
Re: Vfp and counter

Author: Fred Taylor

Posted: 2011-12-04 22:47:32   Link

SET ODOMETER only has effect for internal VFP counters, like INDEX ON, etc.

If you want to periodically report your progress at some point, do a MOD()

on your counter, something like this:

m.todo = RECCOUNT()

m.done = 0

SCAN ALL

m.done = m.done +1

IF MOD(m.done,100)=0

WAIT WINDOW NOWAIT TRANSFORM(m.done)+" of "+TRANSFORM(m.todo)+"..."

ENDIF

* do your processing here

ENDSCAN

That will show you a WAIT WINDOW every 100 rows processed.

Fred

On Sun, Dec 4, 2011 at 4:12 PM, Sytze de Boer <sytze.kiss@gmail.com> wrote:

> I think it must be brain fade or something

>

> I have tried different things but can't seem to find a solution

> I have a large table that needs manipulating

>

> Select winstoks

> Go Top

> mtodo=Reccount()

> mdone=0

> Do Case

> Case Reccount()>100000

> Set Odometer To 10000

> Case Reccount()>10000

> Set Odometer To 1000

> Case Reccount()>1000

> Set Odometer To 100

> Otherwise

> Set Odometer To 10

> Endcase

> Set Talk On

> Set Talk Window

>

> Scan

> mdone=mdone+1

> Wait Window Nowait Str(mdone)+" / "+Str(mtodo)

> Do windnewpric2

> Select winstoks

> Endscan

>

> Set Talk Off

> Wait Clear

> Set Odometer To 100

>

> in this case the table has 81,000 records

> The problem is that it chooses to freeze the wait window factor at a random

> number and it looks like the system is frozen

> But in fact, it is still processing

> The app in fact tells you it is "not responding" but if you leave it long

> enough, it will complete normally

>

> I've also tried this with a thermometer routine, and it does the same thing

> i.e. it looks like the thermometer is frozen at a particular point so

> people use the task manager to abort the routine

>

> As a second observation, the set odometer seems to have no effect

>

> (It's monday morning here ..................)

>

>

> --

> Regards

> Sytze de Boer

> Kiss Software

>

>

> --- StripMime Report -- processed MIME parts ---

> multipart/alternative

> text/plain (text body -- kept)

> text/html

> ---

>

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/CAJCBksrkXUeEFKs2er7LsG=8mdQ+hZLY4wD8A_3qW-w8mun8rA@mail.gmail.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2011 Fred Taylor
Back to top
Re: Vfp and counter

Author: Sytze de Boer

Posted: 2011-12-04 23:09:53   Link

Fred, many thanks

On Mon, Dec 5, 2011 at 4:47 PM, Fred Taylor <fbtaylor@gmail.com> wrote:

> SET ODOMETER only has effect for internal VFP counters, like INDEX ON, etc.

>  If you want to periodically report your progress at some point, do a MOD()

> on your counter, something like this:

>

> m.todo = RECCOUNT()

> m.done = 0

> SCAN ALL

>  m.done = m.done +1

>  IF MOD(m.done,100)=0

>    WAIT WINDOW NOWAIT TRANSFORM(m.done)+" of "+TRANSFORM(m.todo)+"..."

>  ENDIF

>  * do your processing here

> ENDSCAN

>

> That will show you a WAIT WINDOW every 100 rows processed.

>

> Fred

>

>

> On Sun, Dec 4, 2011 at 4:12 PM, Sytze de Boer <sytze.kiss@gmail.com> wrote:

>

>> I think it must be brain fade or something

>>

>> I have tried different things but can't seem to find a solution

>> I have a large table that needs manipulating

>>

>> Select winstoks

>> Go Top

>> mtodo=Reccount()

>> mdone=0

>> Do Case

>> Case Reccount()>100000

>>   Set Odometer To 10000

>> Case Reccount()>10000

>>   Set Odometer To 1000

>> Case Reccount()>1000

>>   Set Odometer To 100

>> Otherwise

>>   Set Odometer To 10

>> Endcase

>> Set Talk On

>> Set Talk Window

>>

>> Scan

>>   mdone=mdone+1

>>   Wait Window Nowait Str(mdone)+" / "+Str(mtodo)

>>   Do windnewpric2

>>   Select winstoks

>> Endscan

>>

>> Set Talk Off

>> Wait Clear

>> Set Odometer To 100

>>

>> in this case the table has 81,000 records

>> The problem is that it chooses to freeze the wait window factor at a random

>> number and it looks like the system is frozen

>> But in fact, it is still processing

>> The app in fact tells you it is "not responding" but if you leave it long

>> enough, it will complete normally

>>

>> I've also tried this with a thermometer routine, and it does the same thing

>> i.e. it looks like the thermometer is frozen at a particular point so

>> people use the task manager to abort the routine

>>

>> As a second observation, the set odometer seems to have no effect

>>

>> (It's monday morning here ..................)

>>

>>

>> --

>> Regards

>> Sytze de Boer

>> Kiss Software

>>

>>

>> --- StripMime Report -- processed MIME parts ---

>> multipart/alternative

>>  text/plain (text body -- kept)

>>  text/html

>> ---

>>

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/CAG1nNy-fBpGLVOnZ6wJKbHy4iewSNgYFUqUQ3icVoJy6ioyH6A@mail.gmail.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2011 Sytze de Boer
Back to top
Re: Vfp and counter

Author: Christof Wollenhaupt

Posted: 2011-12-05 03:50:16   Link

When processing larger amounts of data it helps to close and re-open the

table from time to time to force VFP to flush buffers and reorganize

memory. While doing so put a different message out. Otherwise VFP will do

this at random times and simply stop responding for a few seconds.

Christof

--- StripMime Report -- processed MIME parts ---

multipart/alternative

text/plain (text body -- kept)

text/html

---

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/CAL4QJhiQvZJGpB5WGVs6z=3PFagas-TeTd5BzGku69XsmaYqyg@mail.gmail.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2011 Christof Wollenhaupt
Back to top
Re: Vfp and counter

Author: Gérard Lochon

Posted: 2011-12-05 08:47:18   Link

> That will show you a WAIT WINDOW every 100 rows processed.

>

> Fred

Optimization ...

It is not necessary to waste time testing at each turn the value of m.done :

here is an alternate one using nested loops.

[VFP]

m.todo = " of "+TRANSFORM(RECCOUNT())+" ..."

m.odom = 100

GO TOP

SCAN REST

SCAN NEXT m.odom

** your instructions

ENDSCAN

WAIT WINDOW NOWAIT TRANSFORM(RECNO())+m.todo

ENDSCAN

[/VFP]

Gérard.

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/AB08FFC9E59C4493A36D03911D4AC686@MuriellePC

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2011 Gérard Lochon
Back to top
Re: Vfp and counter

Author: Jean MAURICE

Posted: 2011-12-05 09:15:37   Link

Gérard, tu es génial !!!!

A+

The Foxil

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/4EDCD209.2080304@wanadoo.fr

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2011 Jean MAURICE
Back to top
Re: Vfp and counter

Author: Fred Taylor

Posted: 2011-12-05 11:53:39   Link

Hey, it's the FOX, always multiple ways to accomplish the goal!

Fred

On Mon, Dec 5, 2011 at 6:47 AM, Gérard Lochon <g-lochon@wanadoo.fr> wrote:

> > That will show you a WAIT WINDOW every 100 rows processed.

> >

> > Fred

>

> Optimization ...

> It is not necessary to waste time testing at each turn the value of m.done

> :

> here is an alternate one using nested loops.

>

> [VFP]

>

> m.todo = " of "+TRANSFORM(RECCOUNT())+" ..."

> m.odom = 100

> GO TOP

>

> SCAN REST

> SCAN NEXT m.odom

> ** your instructions

> ENDSCAN

> WAIT WINDOW NOWAIT TRANSFORM(RECNO())+m.todo

> ENDSCAN

>

> [/VFP]

>

>

> Gérard.

>

>

>

>

>

>

>

>

>

>

>

>

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/CAJCBksotuZ=vWNpWDuHA9mpdAzKmPXnvXBqOg=j=_tY4yzwvwg@mail.gmail.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2011 Fred Taylor
Back to top
RE: Vfp and counter

Author: Jarvis, Matthew

Posted: 2011-12-05 12:30:18   Link

> Hey, it's the FOX, always multiple ways to accomplish the goal!

>

> Fred

And just for the record, any kind of video display such as counter

updates etc can slow down your app A LOT...

Easy enough to test which works better, but WAIT WINDOW NOWAIT can be a

poor choice... perhaps faster is a place on the screen, say the bottom

row, that gets updated...

Thanks,

Matthew Jarvis || Business Systems Analyst

IT Department

McKenzie-Willamette Medical Center

1460 G Street, Springfield, OR 97477 || Ph: 541-744-6092 || Fax:

541-744-6145

--------------------------------------------------------------------------

Disclaimer: This electronic message may contain information that is

Proprietary, Confidential, or legally privileged or protected. It

is intended only for the use of the individual(s) and entity named

in the message. If you are not an intended recipient of this

message, please notify the sender immediately and delete the

material from your computer. Do not deliver, distribute or copy

this message and do not disclose its contents or take any action in

reliance on the information it contains.

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/69F310C05DD83C48A84BA3769CE1ECF805F27ADA@TNTRIEXEVS02.triadhospitals.net

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2011 Jarvis, Matthew
Back to top
Re: Vfp and counter

Author: Stephen Russell

Posted: 2011-12-05 12:41:02   Link

On Mon, Dec 5, 2011 at 11:30 AM, Jarvis, Matthew <MatJar@mckweb.com> wrote:

>> Hey, it's the FOX, always multiple ways to accomplish the goal!

>>

>> Fred

>

>

> And just for the record, any kind of video display such as counter

> updates etc can slow down your app A LOT...

>

> Easy enough to test which works better, but WAIT WINDOW NOWAIT can be a

> poor choice... perhaps faster is a place on the screen, say the bottom

> row, that gets updated...

----------------------

I remember that issue as well.

My take was to identify a scan volume and only do an update on

progress so often depending on that volume.

Two params in were ScanLocation <row currently on> and ScanTotalCount

I would change the divisor as needed.

if scanLocation/divisor = int(scanLocation/divisor)

do thermBar(scanLocation, ScanTotalCount)

endif

Change to the divisor from 7, 21,39, 61, ... would speed up process

that I wanted to take place. The visual clue to the user was just

pretty icing on the cake.

--

Stephen Russell

901.246-0159 cell

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/CAJidMY+XEgGZx8PoPmm6ZnHuOBEu_s242XHzi+mz=uD0de6Q+A@mail.gmail.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2011 Stephen Russell
Back to top
Re: Vfp and counter

Author: MB Software Solutions, LLC

Posted: 2011-12-05 16:49:31   Link

On 12/5/2011 8:47 AM, Gérard Lochon wrote:

>> That will show you a WAIT WINDOW every 100 rows processed.

>>

>> Fred

>

> Optimization ...

> It is not necessary to waste time testing at each turn the value of m.done :

> here is an alternate one using nested loops.

>

> [VFP]

>

> m.todo = " of "+TRANSFORM(RECCOUNT())+" ..."

> m.odom = 100

> GO TOP

>

> SCAN REST

> SCAN NEXT m.odom

> ** your instructions

> ENDSCAN

> WAIT WINDOW NOWAIT TRANSFORM(RECNO())+m.todo

> ENDSCAN

>

> [/VFP]

>

>

> Gérard.

Very neat, Gérard!

Wonder how much more efficiency that really gets you?

--

Mike Babcock, MCP

MB Software Solutions, LLC

President, Chief Software Architect

http://mbsoftwaresolutions.com

http://fabmate.com

http://twitter.com/mbabcock16

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/4EDD3C6B.9090405@mbsoftwaresolutions.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2011 MB Software Solutions, LLC