
ISQL Statements
3.7.6DEFINE
Syntax
DEFINE [ variable_name = value ] ;
Description
The DEFINE statement defines a variable and assigns an ASCII string value to it. When you refer to the defined variable in DISPLAY statements, ISQL prints the value.
The DEFINE statement is useful if you have scripts with many DISPLAY statements. You can change a single DEFINE statement to change the value in all of the DISPLAY statements that refer to the variable.
Issuing the DEFINE statement without any arguments displays any
Arguments
variable_name
Specifies the name by which the variable can be referred to.
value
The ASCII string that is assigned to the variable. Enclose value in quotes if it contains any non- numeric values.
Example
The following example defines a variable called nestate and assigns the value NH to it.
ISQL> DEFINE nestate = "NH" ;
3.7.7DISPLAY
Syntax
DISPLAY { [ col_position ] display_value } [ , … ] ON break_spec ; col_position::
{COL column_number @ column_name } display_value::
{"text string" variable column_name } break_spec::
{column_name ROW PAGE REPORT }
Description
The DISPLAY statement displays the specified text, variable value, and/or column value after the set of rows specified by break_spec. DISPLAY statements have no effect until you issue a BREAK statement with the same break_spec.
FairCom Corporation |