DEFINE CLPPlus command

The DEFINE CLPPlus command creates a user variable, also called a substitution variable, and specifies its value. The command also displays the value of one or more user variables.

Invocation

The DEFINE command must be executed from the CLPPlus interface.

Authorization

None

Required connection

None

Command syntax

Read syntax diagramSkip visual syntax diagramDEFINEDEF variable text

Command parameters

variable
Specifies the name of a variable. If you specify variable without text, the name of the variable and its value are displayed. If you do not specify variable, the names of all variables and their values are displayed.
text
Specifies text to assign to the variable specified by variable. If the text contains spaces, you must enclose it in double or single quotation marks. If the text does not contain spaces, quotation marks are optional.

Example

In the following example, the DEFINE command defines the Db2®, DEPT, and NAME variables and then displays the values of all variables:
SQL> DEFINE DEPT = 20
SQL> DEFINE NAME = 'John Smith'
SQL> DEFINE DB2 = 'localhost:5445/sample'
SQL> DEFINE
DEFINE DB2 = "localhost:5445/sample"
DEFINE DEPT = "20"
DEFINE NAME = "John Smith"