Location Override for Fetches and Updates

This page applies to Local Database Resilience and Multiple Resilience Configurations Only

The special value LOCN_OVERRIDE can be added to the flags for a fetch or update operation. This will cause the default setting of the local/remote flag for the table involved to be reversed; if the table is marked as local, the operation will be done on the remote server(s), and if the table is marked as remote it will be done on the local database.

In multiple resilience configurations you can check the state of the network.local flag for the table to see whether a table is marked as remote or not.

Unfortunately there is no easy way to check whether a table is local or remote for local resilience - you have to fetch the @reldata record for the table and test the F_LOCAL flag in reldata.rel_flags, remebering to invert the value for base dictionary tables!.

In multiple server resilience, the set of servers used for a database operation can be more finely controlled using the @NETWORK table as described earlier. However it is often convenient to use this flag where a program is transferring data from a local database to a server, or vice versa.

In QAB programs LOCN_OVERRIDE can be specified for database update operations (by changing the QKILL_FLAGS or QPOST_FLAGS ) variables. (See the QAB Standard Variable Reference for details). However LOCN_OVERRIDE cannot be specified in database reads, unless they are done in a C exit, so you would have update the @NETWORK record for the table instead.