I'd strongly suggest using the Unibasic SELECT <file> TO <listname>
instead of EXECUTE "SELECT <filename> <selection criteria>"

Then you just specify your selection criteria inside your loop.

A few advantages that I've personally experienced, but there are
probably more:

The READNEXT begins immediately (does not wait for the whole file to be
checked)
You can nest your SELECTS (not that this is an ethical, but you can)
You're not dependent on the accuracy of the dictionary
If your selection criteria is part of the key, you don't even have to
read the record if the key element fails the selection
And you can write a cool little subroutine that keeps the human
accurately informed as to the progress and estimated time of completion
of their program

The next-to-last one may depend on Unidata vs. Universe.  I understand
that Unidata only 'fetches' the key in the READNEXT while I believe
Universe grabs both the key and record, due to the construct of the
database.

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Tuesday, October 25, 2011 4:08 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] UniBasic Question






And... when you prematurely quit from an execution level which *had*
been processing a select list.... your select list is not thrown away.
Which is annoying.

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to