DB file search order

First, when in doubt about the DB file search order, use the >dbstatus command to find out what order you are getting.

The last DB file opened read/write is the first that will be searched if any are open read/write. After that the DB files are searched in the reverse of the order that they were opened, without regard to read/write status.


Thus the rule is: use the last opened read/write file first, otherwise the search is last seen first searched.

If you want to be sure of the DB file from which information is being retrieved, use the DB file name/study name qualifier before the variable’s name.

The syntax for this is:

dbfile^entry, as in db1^var1