SET GLOBAL: linear syntax
The name of the global variable can be up
to 17 characters long, and the length of the value must be 2,000
characters or less. The linear syntax for the SET GLOBAL command
is as follows:

.-+---+------------------------.
| '-,-' |
V (1) .-=-. |
>>-SET--GLOBAL--(-----variablename-------+---+---+-------------->
(2)
>--+-value----------+--+---+-----------------------------------><
| (3) | '-)-'
'-&variable------'
Notes:
- Identifies the global variable to which a value is assigned.
- The character string that makes up the content of the global
variable. A value that contains blank characters must be surrounded
with delimiters. Valid delimiters for a global value are single
quotes, parentheses, and double quotes. When the delimiters are double
quotes, the double quotes are included as part of the global variable.
When a SET GLOBAL command is entered from a linear proc and the
variable value spans multiple lines, the value must be enclosed
in quotes and a continuation character (+) must be used in the first
position of each line. When the delimiters are double quotes, the
double quotes are included as part of the global variable value.
Parentheses cannot be used as a delimiter when spanning multiple
lines.
- A global variable name which contains the content of the
global variable.
- varname=value
- Assigns a value to a variable name.
For example, to set a global variable called DEPT, issue the
following command:
- In your linear procedure:
SET GLOBAL (DEPT=38
- In your procedure with logic:
"SET GLOBAL (DEPT=38"
For more information about the SET GLOBAL command, see DB2 QMF Reference.
When you define a global variable, it remains defined until you
reset the variable or end your QMF session. For information about
using the RESET GLOBAL command, see DB2 QMF Reference.
