You can change the value of variables by using the EVAL command with the assignment operator (=).
The scope of the variables used in the EVAL command is defined by using the QUAL command. However, you do not need to specifically define the scope of the variables contained in a CL module because they are all of global scope.
You can use the EVAL debug command to assign numeric, character, and hexadecimal data to variables provided they match the definition of the variable.
To change the value of the variable, type the following on the debug command line:
EVAL variable-name = value
Variable-name is the name of the variable that you want to change and value is an identifier or literal value that you want to assign to variable-name.
Look at the next example:
EVAL &COUNTER = 3.0
The above example changes the value of &COUNTER; to 3.0 and shows the following on the message line of the Display Module Source display:
&COUNTER = 3.0 = 3.0
The result is preceded by the variable-name and value you are changing.
When you assign values to a character variable, the following rules apply: