HOLD [ ALLBASE/ISQL Reference Manual ] MPE/iX 5.0 Documentation
ALLBASE/ISQL Reference Manual
HOLD
The HOLD command puts SQL and ISQL commands into the command buffer,
overwriting the current contents of the command buffer.
Scope
ISQL only.
ISQL Syntax
HO[LD] {SQLStatement} [EscapeCharacter;{SQLStatement}] [...]
{ISQLCommand } [ {ISQLCommand }]
Parameters
SQLStatement is any SQL statement, which may contain one or
more parameters.
ISQLCommand is any ISQL command, which may contain one or
more parameters.
EscapeCharacter is the character currently defined with the SET
command using the ESCAPE option. Use the escape
character and a semicolon between commands when
you put multiple commands into the command
buffer.
Description
* Identify parameters with an ampersand (&) and a number from 1
through 100. For example:
isql=> HOLD SELECT &1 FROM &2 WHERE &3;
You substitute values for the parameters when you issue the START
command. Parameters assigned the same number are all assigned the
same value. Refer to the START command for more information.
* When commands are in the command buffer, you can operate on them
with the following ISQL commands:
CHANGE
RECALL CURRENT
START
STORE
[REV BEG]
* The command buffer can hold as many as 32K bytes.[REV END]
* The following ISQL operations replace the contents of the command
buffer:
HOLD
RECALL FILE
RECALL HISTORY
* When scanning a HOLD command, ISQL deletes any escape character
and treats the character following an escape character as a simple
character. Therefore, if an escape character is to appear in the
command buffer, you must use three escape characters instead of
one (that is, the escape character and the following character
must each be escaped). The escape character and semicolon are
still required between commands when multiple commands are placed
in the command buffer.
The following shows the correspondence between what you want to
place in the command buffer and what you must type in with the
HOLD command:
To put this in command buffer: Type this:
SYSTEM FILE ISQLLP\;DEV=PP; HOLD system FILE ISQLLP\\\;DEV=PP;
SYSTEM FILE ISQLLP; info t1; HOLD system FILE ISQLLP\; info t1;
SELECT * from t1 where c = '\\'; HOLD select * from t1 where c = '\\\\';
Example
isql=> RECALL CURRENT;
Command buffer currently empty. (DBERR 1)
isql=> HOLD SELECT &1 FROM &2 WHERE &3;
isql=> RECALL CURRENT;
SELECT &1 FROM &2 WHERE &3;
isql=>
MPE/iX 5.0 Documentation