SQL/MX 3.2.1 Reference Manual (H06.26+, J06.15+)

MXCI Commands
HP NonStop SQL/MX Release 3.2.1 Reference Manual691117-004
4-28
Exclamation Point (!) Command
Exclamation Point (!) Command
The exclamation point (!) command re-executes a previous MXCI command.
You can use ! only within an MXCI session.
text
specifies the text of the most recent use of a command. The command must have
been executed beginning with text, but text need be only as many characters
as necessary to identify the command. Leading blanks are ignored.
[-]number
is an integer that identifies a command in the history buffer. If number is negative,
it indicates the position of the command in the history buffer relative to the current
command; if number is positive, it is the ordinal number of a command in the
history buffer.
The HISTORY command displays the commands or statements in the history
buffer. See HISTORY Command on page 4-44.
To re-execute the immediately preceding command, enter an exclamation point without
specifying text or number. If you enter more than one MXCI command on a line, the
exclamation point re-executes only the last command on the line.
Examples of !
Suppose that you have a series of statements you have executed. Re-execute the
last SELECT:
>>! SELECT;
>>SELECT * FROM samdbcat.invent.partsupp;
PARTNUM SUPPNUM PARTCOST QTY_RECEIVED
------- ------- ------------ ------------
2000 95 1000.00 10
2010 99 30.00 20
2020 186 200.00 30
...
Re-execute the second to the last command:
!-2;
Re-execute the second command in the history buffer:
! 2;
! [text | [-]number]