Structure of the Q.GLOBAL_VARS table

The Q.GLOBAL_VARS table stores global variable values and session variable values. This table is created at QMF installation and is required for QMF to start, except on DB2® for VSE and VM.

A QMF administrator can use the Q.GLOBAL_VARS table to specify global variable values that are to be set when QMF starts. Depending on the value of the UPDATEABLE column for each defined global variable, users can change these global variable values after QMF initialization. By default, a global variable value is retained until a user resets it or ends the QMF session. However, the DSQEC_USERGLV_SAV global variable can be set to save global variable values from one session to another. In this case, a user’s global variable values are also stored in this table.

The DSQEC_SESSGLV_SAV global variable can also be set to save a user’s input on QMF panels, both within a session and across sessions. In this case, the user’s panel input is saved in the Q.GLOBAL_VARS table as session variables, which have a prefix of DXY.

Although the table can be empty, columns cannot contain null values.

Table 1. Structure of the Q.GLOBAL_VARS table
Column name Data type and length Function and possible values
VARNAME CHAR(18)
Function
Specifies the name of the global variable or session variable.
Values
Any valid global variable name or session variable name.
UPDATEABLE CHAR(1)
Function
Specifies whether the global variable value can be changed by users after QMF initialization.
Values
0
Specifies that the global variable cannot be updated during the QMF session.
1
Specifies that the global variable can be updated during the QMF session.

Some QMF global variables, such as those that record information about the state of the current QMF session, are read-only. If you include a read-only global variable in the Q.GLOBAL_VARS table, the variable is not set at initialization, regardless of the UPDATEABLE setting. QMF initialization also fails.

For global variables that are saved across sessions, this value is set according to whether the variable can currently be updated by the user. If the variable cannot be updated, this value is set to 0. Otherwise, it is set to 1.

USERID VARCHAR(128)
Function
Specifies a QMF user ID.
Values
SYSTEM
This value must be used when initial global variable values are added to the table by an administrator. This value specifies that the global variable applies to all users.
SYSTEM is the default value.
userid
When global variable and session values are added to the table, this value is set to the user's QMF ID.

The USERID and VARNAME fields are used as the primary key for each global variable entry.

VARVALUE VARCHAR(2000)

At installation, the VARVALUE column is defined with a length of 2000. However, any length from 18 to 32555 can be used.

Function
Specifies the value of the global variable or session variable.
Values
Any valid global variable value.