Sort/select processing when sorting by associated fields
Kenneth Brody
kenbrody at bestweb.net
Wed Jan 30 09:36:50 PST 2008
If you have a file with 100 records, and each record has 5 non-blank
instances of the associated field on which you are sorting, then the
sort/select processing will be run 500 times, not 100. It will be
run for each non-blank instance of the associated field used for the
sort. (This allows you to select only certain instances from within
your sort/select processing.) If all instances of the field are
blank within a given record, the first instance will be selected.
You can verify this by creating a simple file. For ease of setting
this up, create a file with five instances of A1, and add 5 records
filling in only 3 instances for each record. Then, create an output
sorted on A1. Finally, create a sort/select processing:
mesgbox "Record " < @rn { "\n at AF = " < @af { "\nA1 = " & A1
When you run the output, you will see that your processing is run
15 times -- one time for each non-blank instance of A1.
--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:ThisIsASpamTrap at gmail.com>
More information about the Filepro-list
mailing list