SET GLOBAL: Extended syntax
To change the value of any of these variables in an application
written in a language other than REXX, (assembler, C, COBOL, FORTRAN,
or PL/I), you must use the SET GLOBAL command with extended syntax.
For examples of this command, see the sample program for the appropriate
language in Appendix A. Sample code for callable interface languages.
The maximum length of a variable name used with a SET GLOBAL
extended syntax command is 17 characters. The maximum length of
a variable value is 32, 768 characters.

>>-SET GLOBAL--(--| Variable definitions |---------------------><
Variable definitions:
|--number of varnames--,--varname lengths--,--varnames--,-------|
|--value lengths--,--values--,--value type----------------------|
- number of varnames
- The number of variables requested.
- varname lengths
- A list of lengths for each variable name specified.
The length of the variable name should be equal to the actual
length of the global name in your storage area. An 18-character
area padded with trailing blanks is allowed.
- varnames
- A list of names of the QMF variables.
- value lengths
- A list of lengths of the values of the variables.
The following rules apply to the variable value:
- If the value length you supply is less than the length of the
value stored in your storage area, the value is truncated on the
right when it is stored in QMF.
- If the value length you supply is greater than the length of
the value stored in your storage area, the value might appear to
have unrecognizable characters in it when it is stored in QMF.
- Integer lengths should always be 4 bytes.
QMF uses whatever value is in storage, starting at the address
you assign for the length you assign. If the length is too long,
QMF might abend.
- values
- A list of variable values.
- value type
- The data type of the storage area that contains the values.
It must be either character or integer.
If you are using SET GLOBAL in the REXX callable interface, you can use
only the linear syntax for the SET GLOBAL command shown in SET GLOBAL. With this linear syntax, the maximum length for
the global variable name is 17 characters, and the maximum length
for the variable value is 2,000 characters.
Rules for using global variables
- On the SET GLOBAL command, variable names are not preceded with
an ampersand as they are on the RUN and CONVERT commands.
- The QMF form does not recognize global variables set to form
variable names or aggregation variable names.
- The QMF form does not recognize global variables with question
marks in the names.
Rules for defining global variable names
- Global variable names are limited to 17 characters when entered
on the command line and 18 characters when entered through the callable
interface. However, due to limitations of the SET GLOBAL command,
you should use 17-character names.
- A global variable name can contain a numeric character, but
the first character of a global variable name cannot be numeric.
- Global variables cannot begin with DSQ because QMF reserves
these letters for QMF predefined global variables.
- The first character of a global variable name must be an alphabetic
character (A through Z) or one of these special characters:
¢ ! $ ~ { } ? @ # % \
- A global variable name cannot contain blanks or any of the following characters:
* ( ) - + ¬ | : ; " ' < > / . , = &
- Trailing blanks are not recognized in global variable names.
