Launches a user-specified editor with a specified command
for editing. When the user finishes editing, saves the contents of
the editor and exits the editor, permits the user to execute the command
in CLP interactive mode.
Scope
This command can only be run within
CLP interactive mode. Specifically, it cannot be run from the CLP
command mode or the CLP batch mode.
Command syntax
>>-+-EDIT-+--+----------------+--+-----+-----------------------><
'-E----' '-EDITOR--editor-' '-num-'
Command parameters
- EDITOR
- Launch the editor specified for editing. If this parameter is
not specified, the editor to be used is determined in the following
order:
- the editor specified by the DB2_CLP_EDITOR registry variable
- the editor specified by the VISUAL environment
variable
- the editor specified by the EDITOR environment
variable
- On Windows operating
systems, the Notepad editor; on UNIX operating systems, the vi editor
- num
- If num is positive, launches the editor with
the command corresponding to num. If num is negative, launches the editor with the command
corresponding to num, counting backwards from the
most recent command in the command history. Zero is not a valid value
for num. If this parameter is not specified, launches
the editor with the most recently run command. (This is equivalent
to specifying a value of -1 for num.)
Usage notes
- The editor specified must be a valid editor contained in the PATH of the operating system.
- You can view a list of the most recently run commands available
for editing by executing the HISTORY command.
- The EDIT command will never be recorded in
the command history. However, if you choose to run a command that
was edited using the EDIT command, this command
will be recorded in the command history.