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

Examples
The following command disconnects and exits from RMXCI:
SQL>exit
If the previously run command returns the error code 4082, the conditional exit command
stops the execution of the script file and then disconnects and exits from RMXCI.
SQL>log /usr/home/errorCode.log
SQL>select * from employee;
SQL>exit if errorcode=4082
SQL>log off
The following results are logged on getting error code 4082:
SQL>select * from employee;
*** ERROR[4082] Table, view or stored procedure SCH.USR.EMPLOYEE
does not exist or is inaccessible.
SQL>exit if errorcode=4082
The following two examples are equivalent:
SQL>EXIT -1 IF LASTERROR <> 0
SQL>EXIT WITH -1 IF LASTERROR != 0
The following example exits RMXCI if the last error code is 4082:
SQL>EXIT WITH 82 IF LASTERROR == 4082
SQL>EXIT -- default status is 0
FC command
The fc command allows you to edit and reissue a command in the history buffer of an RMXCI
session. You can display the commands in the history buffer by using the history command. For
information about the history buffer, see the “HISTORY command” (page 68).
Syntax
FC [text | [-]number]
text
is the beginning text of a command in the history buffer. Case is not significant in matching
the text to a command.
[-]number
is either a positive integer that is the ordinal number of a command in the history buffer or a
negative integer that indicates the position of a command relative to the most recent command.
Without text or number, fc retrieves the most recent command.
64 RMXCI commands