I chose to do the: EXECUTE "SELECT filename" RTNLIST CAPTURING JUNK
Since it also does a SELECT filevarible with it in the RTNLIST.
Both COUNT and SELECT in the EXECUTE set the @SELECTED correctly,
so it would still work with the COUNT, just I'd still have to do
SELECT filevarible afterwards.

George

> -----Original Message-----
> From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-
> boun...@listserver.u2ug.org] On Behalf Of Dave Laansma
> Sent: Tuesday, October 19, 2010 2:10 PM
> To: U2 Users List
> Subject: Re: [U2] How many will be selected?
> 
> The problem with this question is, if I understand correctly, the
> SELECT
> F.FILENAME statement does not truly select the entire file all at once.
> 
> It essentially selects one group at a time and passes those keys to the
> READNEXT statement as they become available.
> 
> Which is why the SELECT F.FILENAME makes keys available to the READNEXT
> statement immediately.
> 
> I have a COUNT.FILE (FILENAME,REC.CNT) subroutine that I use to get the
> number of records that are in the file just before I initiate the
> SELECT
> F.FILENAME statement.
> 
> The subroutine performs a simple COUNT command and returns one number.
> 
> The COUNT command seems to run faster than the corresponding SELECT,
> especially for larger files, since I'm guessing that it doesn't build
> the list as it is reading the keys.
> 
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to