Advanced initialisation

When initialising Bank Wizard you can specify which countries are initialised and which set of Database Table Files (DTFs) you use. You use BWISetRuntime to change the initialisation behaviour.

Initialising a sub-set of countries

By default Bank Wizard initialises all licensed countries, however you can improve performance by calling BWISetRuntime before initialisation to specify exactly which countries are initialised. For example, to only initialise the United Kingdom:

BWISetRuntime(BWI_R_INC_COUNTRY,BWI_C_UK)

To initialise multiple countries, call BWISetRuntime multiple times. For example, to initialise the UK and France:

BWISetRuntime(BWI_R_INC_COUNTRY,BWI_C_UK)

BWISetRuntime(BWI_R_INC_COUNTRY,BWI_C_FRANCE)

You can also exclude countries from the initialisation. For example to exclude the UK from the initialisation:

BWISetRuntime(BWI_R_EX_COUNTRY,BWI_C_UK)

To exclude multiple countries, call BWISetRuntime multiple times. For example to initialise all licensed countries except the UK and France:

BWISetRuntime(BWI_R_EX_COUNTRY,BWI_C_UK)

BWISetRuntime(BWI_R_EX_COUNTRY,BWI_C_FRANCE)

Do not use a combination of BWI_R_INC_COUNTRY and BWI_R_EX_COUNTRY within a single program as the resulting behaviour will be unpredictable.

Dynamic Update

Dynamic Update is the process of loading new DTFs without shutting down either Bank Wizard or your application. To use dynamic update you configure Bank Wizard to use the table set specified in a configuration file. This configuration file is created when you enable Dynamic Update from Data Manager.

Use BWISetRuntime with item BWI_R_TABLE_SET to define which table set should be loaded when BWIInit is next called.

When BWIInit initialises with a different table set, it attempts to load the requested set from the same location as the current set. If the requested set is not available, incomplete or corrupt, Bank Wizard remains initialised with the original set of DTFs.

Bank Wizard does not unload the original DTFs until all handles which reference them have been freed. This means any checks that are already in progress finish normally. However, any handles created after the update reference the new DTFs. Therefore, to make sure you are using the most up to date tables, use a handle for a single check and only keep it for as long as it is required.

/* Initialise using table set specified in configuration file (specified using -1) */

BWISetRuntime(BWI_R_TABLE_SET,-1)

BWICreateHandle(h)

BWIInit(h)

/* Deal with conditions as per the main example */

BWIFree(h)

During Dynamic Update, the Licence Key is checked. An invalid or expired Licence Key will stop Bank Wizard and all existing handles will become invalid.

Experian recommend that your application stores the last table set used. Then when the application restarts, it uses the same set to initialise Bank Wizard. For example, in Java the application could store this in a properties file which is read when your application starts.

Caching Database Table Files

By default, Bank Wizard loads into memory the minimum data needed to perform validation. All other data (such as branch details) are read from the DTFs when requested by your application. If your application performs a large number of searches or accesses branch details for each check, you can cache the DTFs to improve performance. This is because once the country's DTF has been cached, there will be no need for further disk access.

/* To cache the branch database for a country */

BWICreateHandle(h)

/* Set the country, in this example UK */

BWISetValue(h,BWI_V_COUNTRY_CHECK,BWI_C_UK)

BWICache(h)

/* Check for fatal conditions to make sure it succeeded */

while(BWINext(h,BWI_N_FATAL)) {

logBWCondition(h,BWI_N_FATAL,SYS_BW_CACHE)

}

BWIFree(h)

For more information about installing and updating DTFs, see the Data Manager documentation.