If the life span of the system variables is extended the possibility exists of writing system variables before and after the start of the decision table system or querying their values if their life span is extended. In this way preallocations can be made or calculated values can be reused.
The functions Initialize variables and Reset variables (for extending the life span/resetting life span and deleting values ) can not only be called up interactively but also from a DataView application.
int |
lgv_usx_sys_ini () |
int |
lgv_usx_sys_clr () |
int |
lgv_usx_sys_get_ini () |
|
After the system table with the function 'lgv_usx_sys_ini' has been initialized, the values of the system variables are only released once the function 'lgv_usx_sys_clr' is called up, even if the execution has been completed ( extended life span). The execution is called up with the usual user exits ('lgv_sel_run', 'lgv_nosel_run'...).
If the system table is initialized at the beginning of a session it is possible to access all initially occupied values of the system variables in all decision table runs as long as 'lgv_usx_sys_clr' or 'lgv_usx_sys_ini' are not called up.
char |
lgv_sys_get_typ(var_nam)
|
int |
lgv_sys_get_knw(var_nam)
|
|
In order to read out global system variables the following functions are available:
long |
lgv_sys_int_rea(var_nam) |
double |
lgv_sys_flo_rea(var_nam) |
char* |
lgv_sys_str_rea(var_nam) |
char |
lgv_sys_log_rea(var_nam) |
|
Please note that when reading a system variable which is so far unoccupied the value is to be determined. This takes place by executing a database access present or by querying the value (standard query form).
In order to fill in system variables the following functions are available:
int |
lgv_sys_int_wri(int,var_nam) |
int |
lgv_sys_flo_wri(flo,var_nam) |
int |
lgv_sys_str_wri(str,var_nam) |
int |
lgv_sys_log_wri(log,var_nam) |
|
The arguments of the above functions have the following meaning:
var_nam |
Name of a system variable of the type 'char*' |
int |
Value of a variable of the user exit of type 'int' |
flo |
Value of a variable of the user exit of type 'float' |
str |
Value of a variable of the user exit of type 'char*' |
log |
Value of a variable of the user exit of 'char' (permissible values are 'y' = logic value TRUE and 'n' = logic value FALSE) |
|
Example:
Within a user exit the call up of functions for reading and writing the system variables can take place as follows:
... |