Use the Command Editor to generate, edit, execute, and
manipulate SQL statements, IMS™ commands,
and DB2® commands; to work with
the resulting output; and to view a graphical representation of the
access plan for explained SQL statements. You can execute commands
and SQL statements on DB2 databases
for Linux,UNIX, and Windows, z/OS® and OS/390® systems
and subsystems, and IMSplexes.
Important: The Command Editor has been deprecated in Version 9.7 and might be removed in a future release.
Start using IBM® Data Studio and IBM Optim™ tools. For a mapping between these recommended tools and Control Center tools, see Table of recommended tools versus Control Center tools.
The Command Editor interface
The Command
Editor is available as two different interfaces. It can be opened
as part of the Control Center (embedded) or in a stand-alone view.
Both versions offer the same set of functions and both allow you to
open multiple Command Editors.
- Embedded
- Using the Command Editor within the Control Center allows you
to control the number of windows open on your desktop. The Command
Editor opens as a tile inside the Control Center. Connections made
by the Control Center are remembered by the Command Editor and can
quickly be selected as targets for commands and SQL statements.
To open an embedded Command Editor,
expand the Control Center object tree until you find a DB2 database for Linux, UNIX, and Windows, z/OS and OS/390 system or subsystem, or
IMSplex. Right-click the object and select Query from the pop-up
menu. A Command Editor tile opens in the Control Center.
- Stand-alone
- Using the stand-alone Command Editor allows you to execute commands
and SQL statements without opening the Control Center.
To open a stand-alone Command Editor,
select Start -> Programs -> IBM DB2 -> Command Line Tools ->
Command Editor .
Working in the Command Editor
The
Command Editor is a notebook with a page for entering commands and
pages for retrieving results. The appearance of this notebook changes
depending on the target for your commands.
- DB2 databases
- The Command Editor appears as a three page notebook:
- Commands page. Use this page to enter your commands and SQL statements.
Command results are displayed in the output area of this page. The
results of multiple SQL queries or queries executed as part of a script
are also displayed in the output area. The results of a single SQL
query can be returned on the Query Results page. You can also use
this page to generate the access plan for SQL statements. The access
plan appears in graphical form on the Access Plan page.
- Query Results page. Use this page to view and work with the results
of a single SQL query. Results are displayed in an editable table.
Use the Command Editor page of the Tools Settings notebook to change
this option.
- Access Plan page. Use this page to view a graphical representation
of the access plan for explainable SQL statements (for example, SELECT,
INSERT, and UPDATE). An access plan indicates the order of operations
for accessing requested data.
- z/OS and OS/390 subsystems
- The Command Editor appears as a two page notebook:
- Commands page. Use this page to enter your commands and SQL statements.
Command results are displayed in the output area of this page, while
SQL results are returned on the Query Results page.
- Query Results page. Use this page to view and work with the results
of your SQL queries. Results are displayed in an editable table.
- z/OS and OS/390 systems
- The Command Editor appears as a one page notebook:
- Commands page. Use this page to enter your commands. Results are
read from the system and displayed in the output area of this page.
Sometimes system processing can be delayed and the displayed results
may be incomplete. Click Refresh to display updated system
output.
- IMSplexes
- The Command Editor appears as a two page notebook:
- Commands page. Use this page to enter your IMS commands. Command results are displayed in
the output area of this page. Detailed results are returned on the
Detailed Results page.
- Detailed Results page. This page appears as a three page notebook.
- Results page. Results are displayed in an editable table.
- Errors page. Any command processing errors are displayed.
- Time page. Host and workstation processing times are displayed.