Back to Rec 3  Help Pages

How do I select records for all species in a group from several vice-counties?

A coleopterist recently wanted to select all waterbeetle records for one or more vice-counties. The problem was that he was expecting to select upwards of 30,000 records. So, if he goes via Reports>Record Selection, he runs into the DOS 64kb limit at this Window and the search falls over. An alternative way of doing this is to run a SELECT directly, working on the Vice-county number (VCN) and selecting all species in one or more families using FAMILY_CODE

(e.g. find records of Dytiscids and Hydrophillids from Huntingdon, Cambridge or Northants):

Go to  Filters - Select  and type:

 SELECT RECORDS WITH VCN = "29" "31" "32" AND WITH FAMILY_CODE = "6441*005" "6441*008"

The coleopterist quite correctly pointed out that FAMILY_CODE is not a standard field in Recorder 3. I have added it to my copy for just this sort of thing and it can be set up as follows:-

 Go to TCL (press [F5])- type DICT RECORDS

- Fill in the window as follows:
Table name     RECORDS (will already be filled in)
Column name  FAMILY_CODE
Dict type        S  (type S and press return and it will show "Symbolic")
Single/Multi     S ( (type S and press return and it will show "Single value")
Formula          @ANS=xlate("SPECIES",{SPECIES},"FAMILY_CODE","X")
Column heading FamCode
Just L
Len 8

Press [F9] to save it and [ESC] to return to TCL

You can test it by typing

LIST RECORDS FAMILY_CODE

You should then see codes like "6441*005" coming up under the FamCode column heading

You can find the codes for particular families - from the main menu select Add/Edit data - Orders & Families. Then type the family name at the Taxa code prompt.

Stuart Ball

 

Background Notes:

Stuart points out that this problem relates to the dear old DOS 64k limit problem which bedevils Rec3.
- Advanced Revelation is a DOS program.
- The DOS operating organises memory into 64kb segments.
-
Because of this, a single variable in Arev (in memory or stored on disk) cannot exceed 64Kb
- RECORD keys are stored as integer numbers and typically have around 4 digits, therefore each one you store in a list typically takes 4 bytes + 1 byte delimiter. If you do the sums, you find this means that you cannot store a list of more than about 11,000 such RECORD ids in a list before it reaches the 64Kb limit.
- If you are attempting to retrieve 30,000 ids, you are clearly exceeding this limit somewhere in the program. Hence it may fall over.
I spent a great deal of time trying to work round this in Rec3, but there are plenty of places where the problem rears it ugly head. It is one of the reasons to move to a different operating system!

It should be pointed out that other users report that it can be perfectly possible to search and generate huge select lists of records at the Record Selection window. eg selecting all valid records of vascular plants after 1990 generated a perfectly useable select list of over 400,000 records at one records centre.

Anyone relying on retrieving records by Vice-county should also remember that this only retrieves records from sites which have a vice-county associated with them. Records entered with just a Location Name will not be retrieved.

 

[Home] [Membership] [Committee] [Events] [Newsletter] [LRCs] [Software] [Links]

This site maintained by NFBR website manager.   ©NFBR 2006
Click here for anti-spam and links policy. Scripts are only used in our visitor counter and for minor visual effect on Home and Membership pages.