SQL/MX Remote Conversational Interface (RMXCI) Guide for SQL/MX Release 3.1 (H06.23+, J06.12+)

Syntax
HISTORY [number]
number
is the number of commands to display. The default number is 10. The maximum number is
100.
Considerations
You must enter the command in one line.
You can use the fc command to edit and rerun a command in the history buffer, or use the
repeat command to rerun a command without modifying it. See the “FC command” (page 64)
or the “REPEAT command” (page 80).
Example
Display the three most recent commands and use fc to display the fourteenth one:
SQL>history 3
14> set schema sales;
15> show tables
16> show views
SQL>fc 14
SQL>set schema sales
....
Now you can use the edit capabilities of fc to modify and run a different set schema statement.
IF...THEN command
IF...THEN statements allow for the conditional execution of actions. If the condition is met, the
action is taken; otherwise, no action is taken.
Syntax
IF {condition} THEN {action} {SQL-terminator}
Condition Parameter
The condition parameter (condition) is a Boolean statement structured as follows:
{variable-name|value}{operator}{variable-name|value}
variable-name
is one of:
{LASTERROR|RECCOUNT|ACTIVITYCOUNT|ERRORCODE|[%]any ENV variable|any SQL parameter}
value
is any integer or a quoted string, where the quoted string is any nonquote character. \ is the
optional escape character.
IF...THEN command 69