QUICK procedure problem.

Watt, Peter PWatt@dairyworld.com
Tue, 23 Feb 1999 13:39:57 -0800


Steve,

First thing I see is that there is no 'GET' on the alias'd file in the while
retrieving.  After the 'put reset', there will be no further values in the
buffer.  The next round will create a blank record except for the one field
you have modified.  Depending on the number, this will DEFINITELY slow down
adding to the database with the same key values.

How many records are being retrieved in the 'while retrieving' statement?
Deleting on any database is about as difficult as adding.  If large amounts
of records are being deleted, then the process will be slow.

Also, if you haven't discovered it yet, DEBUG is very useful in determining
which statement is taking the time.

Regards,
Peter

	-----Original Message-----
	From:	Steve Huckvale [SMTP:shuckvale@cosworth-racing.co.uk]
	Sent:	Tuesday, February 23, 1999 11:28 AM
	To:	pwatt@kirk.dairyworld.com
	Subject:	QUICK procedure problem.

	All,

	Can anyone help me with a piece of QUICK screen code (current
version 7.09E
	on MPEix) which is causing no end of problems to me.  Currently I
have
	several screens running a while retrieving sequential construct to
perform
	updates on selected records from an IMAGE dataset with over 100,000
records.
	These screens were fine in the early days when the dataset in
question was
	smaller but now they're a major drain on CPU time which I need to
plug.  My
	current (non-)solution is the code below;

	********************************************************

	file MYFILE designer open 1
	file MYFILE alias MYFILEALIASED open 2
	...
	procedure internal UPDATEMYFILE
	begin
	  while retrieving MYFILE viaindex MYKEY using THISKEY
	  begin
	    let NONKEYFIELD of MYFILEALIASED = "XYZ"
	    put MYFILEALIASED reset
	    delete MYFILE
	    put MYFILE
	  end
	end

	********************************************************

	This seems to work fine until the 'while retrieving' loop hits the
records
	added via the alias and (I think) loops infinitely.  Without the
alias I
	only get to update one record, as soon as I PUT to the dataset the
record
	pointers get lost and the while retrieve construct falls through.

	My apologies in advance if this is elementary stuff, I'm afraid it's
	inherited code and whilst I've done the 'Intro to Powerhouse' course
I'm
	still waiting to get on 'Advanced Part 1' which I believe covers
QUICK quite
	comprehensively.  In the meantime I'd be most grateful if somebody
could
	point me in the right direction towards a solution.



	Steve Huckvale
	Cosworth Racing Ltd.

	= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = = =
	Subscribe: "subscribe powerh-l" in message body to
majordomo@lists.swau.edu
	Unsubscribe: "unsubscribe powerh-l" in message to
majordomo@lists.swau.edu
	powerh-l@lists.swau.edu is gatewayed one-way to
bit.listserv.powerh-l
	This list is closed, thus to post to the list, you must be a
subscriber.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.