Changing a global variable value
Global variable values that you can change appear within parentheses on the GLOBALS panel. If a value is not enclosed in parentheses, it is read-only.
About this task
Some variable names are reserved for use by QMF. These names begin with the letters DSQ. Some DSQ variables have a restricted set of acceptable values. For example, the variable DSQDC_COST_EST (which controls the display of the database cost estimate) must have a value of either 0 or 1.
Procedure
To change a variable value, use one of the following options:
- On the QMF command line,
enter the SET GLOBAL command with the following syntax:
SET GLOBAL (variable_name = valueFor example, to set a new global variable called JOBTYPE to the value SECRETARY, enter the following command:SET GLOBAL (JOBTYPE='SECRETARY'You can also set the value of a global variable by copying a value from another global variable with the following syntax:
For the SET GLOBAL command, the maximum length of the value is 55 characters, and you can create or change up to ten global variables. For more information on the SET GLOBAL command, see QMF Reference.SET GLOBAL (variable_name = &variable_name - On the QMF command line,
enter the SHOW GLOBALS command to display the GLOBALS panel. To change
a global variable value, type the new value over the displayed value
and press Enter.
If the variable value is too long to be displayed completely, a greater-than sign (>) displays in the right margin. To change or assign a value that is longer than 50 bytes, use the Show Global Variable panel as follows:
- Move the cursor to the line that contains the variable name.
- Press the Show Field function key, which displays the Show Global Variable panel. The entire variable value appears in a scrollable area.
- Type the new value over the displayed value and press Enter.