To further increase your speed with the file copy method use the Overwrite
option (O when writing the data back to the cleared desired file from the
temp file. This prevents the COPY command from seeing if the record exists
and offering up the message. Technically if any target file is cleared, use
the (O option in COPY for optimum performance.

My 1 cent.

----- Original Message -----
From: "Allen Egerton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 13, 2004 10:48 AM
Subject: Re: [U2] LOOP or GOTO on READNEXT


> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, December 13, 2004 10:33 AM
> Subject: [U2] LOOP or GOTO on READNEXT
>
>
> > My intent is not to start a religious discussion about GO or GOTOs
because
> > I see that method all over the place and regardless of why, who or
> > whatever, my question is, which is faster. (I prefer using loop..repeat
> > syntax, FWIW).
> <snip>
>
> Loops are loops, they're executed internally with jumps and skips...  The
> LOOP WHILE construct is for the programmer, not for the runtime machine.
>
> You really want faster?  Create a new file sized appropriately, read the
rec
> from original file, modify the key, write it to the new file.  Delete the
> old file after backing it up, or rename it to keep it available.
>
> Oh, and do something to keep new keys from being written to the original
> file while you're busy copying it, perhaps renaming it as your first step
> instead of your last one.
>
> HTH.
> -------
> u2-users mailing list
> [EMAIL PROTECTED]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to