Interactive Query Tool
The DBCLI Interactive Query Tool is a 3270 terminal-based user interface that allows to connect to a database, execute SQL statements and retrieve the results, from within a 3270 terminal. This can be done fully interactively. No programming is required.
To start the DBCLI Interactive Query Tool start transaction IDBT in a CICS terminal.
The IDBT transaction accepts optional parameters:
- IDBT [KEY=VALUE][,KEY=VALUE]....
Parameter names are case insensitive. Multiple parameters are separated by comma or blank.
The following parameters are supported:
- UPPERCASE=YES|TRUE|ON|NO|FALSE|OFF (Default: OFF)
- When specifying UPPERCASE=YES (or TRUE or ON), then all terminal input and output is automatically translated to uppercase. This can be useful for Japanese users where lowercase letters are not displayed correctly. Note that some databases are case-sensitive but you can only enter uppercase data when uppercase mode is on.
- LOCALE=nnnnn
- Specifies the locale to use (e.g. En_US.IBM-1047). The locale affects formatting of numeric values (decimal point, thousands-separator, grouping), as well as date and time displays. For a list of supported locales, see manual LE/VSE C Run-Time Programming Guide, SC33-6688, Appendix D: “Locales Supplied with LE/VSE C Run-Time”.
- AUTOCOMMIT=YES|TRUE|ON|NO|FALSE|OFF (Default: OFF)
- When specifying AUTOCOMMIT=YES (or TRUE or ON) then all updates that are made to tables via the DBCLI Interactive Terminal are committed automatically right after each SQL statement execution. For AUTOCOMMIT=NO (or FALSE or OFF or parameter not specified), the updates are not committed immediately, but are only omitted when the user disconnects gracefully from the database, or when the user presses the PF8 (COMMIT) key. PF7 (ROLLBACK) rolls back the changes.
- MAXCOLBUFFERSIZE=nnn (Default is 65536)
- Specifies the maximum size in bytes that is used as column buffer when fetching query results. When a column requires a larger buffer, then it cannot be fetched and the column will be marked as “TOO LONG” in the result set display.
- MAXCOLDISPLAYSIZE=nnn (Default is 64)
- Specifies the maximum width in characters that a column is displayed. When a column requires more characters, the displayed data is truncated. The highest possible value is 512. Any higher values are silently ignored and 512 is used.
- TRACE=OFF|SYSLST|SYSLOG|BOTH|SCREEN|DBCLI
- Enables tracing. Tracing should only be turned on if requested by an IBM support
representative.
- TRACE=OFF Trace is off (default).
- TRACE=SYSLST Trace to SYSLST is enabled.
- TRACE=SYSLOG Trace to SYSLOG is enabled.
- TRACE=BOTH Trace to SYSLST and SYSLOG is enabled.
- TRACE=SCREEN Screen Trace to SYSLST and SYSLOG is enabled.
- TRACE=DBCLI DBCLI Trace to SYSLST and SYSLOG is enabled.
The Interactive Query Tool displays 3270 based screens. The initial screen shown in Figure 1 shows you how to specify to which DBCliServer and which database alias you want to connect. Enter the required input and press enter.
The next screen shown in Figure 2 allows you to enter an SQL statement that you want to execute.
- PF3
- Back to the previous screen, disconnects from the database and thus commits all changes made so far.
- PF4
- List the tables that the database you are connected to supports.
- PF5
- List the columns that the database you are connected to supports.
- PF7
- Roll back any changes that have been done in this session.
- PF8
- Commit all changes.
You can scroll through the data by pressing
- PF3
- Back to the previous screen.
- PF4
- Move on to the next result, if the SQL statement produced multiple result sets.
- PF7
- BackwardNote: Scrolling backwards is only possible if the underlying result set supports scrolling.
- PF8
- Forward
- PF10
- Left
- PF11
- Right