next up previous contents
Next: Creating Titles Up: User Access to Titles Previous: COMMON Block Access   Contents


Reinitialisation

The code described in the previous section will form part of an SU's initialisation routine. Unless the SU is static, the initialisation routine will be called again if any of its titles banks change. Initialisation routines have a MODE parameter which is set to (see su_mnemonics.inc):-

KSU_INITIALISE
The first call. The code must call MT_REQUEST_TITLES to identify the titles it requires.

KSU_REINITIALISE
Second or subsequent call, one or more titles banks have changed. SUs will only be asked to reinitialise once per context change, regardless of the number of their titles banks that have changed. During reinitialisation it is O.K. to request the same banks again or new ones; the only code that must not be executed again is ``one-off'' code. For example:-

For an SU that does not preprocess its titles in any way and simply reads the values via its link or the mapped COMMON, the initialisation routine can return at once when asked to reinitialise.

If an SU has several titles files and wants to know which ones have changed then it should save the value of the database header word KDBHD_MANAGED_ID. This will increase each time the bank changes. It could be used if preprocessing is very time consuming and is to be avoided if possible.


next up previous contents
Next: Creating Titles Up: User Access to Titles Previous: COMMON Block Access   Contents
sno Guest Acct 2009-09-09