To use ISQL in a VM environment, follow these steps:
To start ISQL, type the following 4-character transaction identifier and press ENTER:
ISQL
To stop communication with the DB2 Server for VM database manager through ISQL, type the following command in the input area and press ENTER:
EXIT
To end your VM terminal session, type the following command and press ENTER.
LOGOFF
To start ISQL, type the following 4-character transaction identifier and press ENTER:
ISQL
If your installation has not defined a default authorization name, enter the authorization-name and password on the ISQL welcome panel, or use the explicit SQL CONNECT statement as follows:
CONNECT authorization-name IDENTIFIED BY password
To stop communication with the DB2 Server for VSE database manager through ISQL, type the following command in the input area and press ENTER:
EXIT
Nullifies changes made since the last SAVE command or, if no previous SAVE command was issued, since the start of the INPUT command. Use this command only while applying the INPUT command with AUTOCOMMIT on.
>>-BACKOUT-----------------------------------------------------><
Displays rows that occur before those that are currently displayed.
>>-BACKWARD----+--------------+-------------------------------->< +-rows_integer-+ '-MAX----------'
Cancels a command, an SQL statement, or a logical unit of work that is in progress.
>>-CANCEL------------------------------------------------------><
Modifies the current SQL statement in the command buffer and displays the result.
>>-CHAnge--/--replaced_string--/----+-----------------------+-->< '-replacing_string--/---'
Displays the result of the interactive select-statement so that it begins with the specified column at the left edge of the display.
.-1-----------------------. >>-COLumn----+-------------------------+----------------------->< '-position_in_select_list-'
Shows the results of the associated interactive select-statement on the display. This command can only be issued from a routine.
>>-DISPLAY-----------------------------------------------------><
Ends the display of either a SELECT, COUNTER, SHOW or INPUT command, or a DISPLAY command in a routine.
>>-END---------------------------------------------------------><
Erases stored SQL statements.
.--------------------------. V | >>-ERASE-------stored_statement_name---+-----------------------><
Ends the current ISQL terminal session.
>>-EXIT--------------------------------------------------------><
Controls the format of the query result that is displayed.
.-------------------------. (1) V | >>-FORMAT-------------| Format options |----+------------------>< Format options |---+--+-BTITLE-+---+-------+-------------------------------------------+-> | '-TTITLE-' +-str---+ | | '-ERASE-' | +-COLumn--column-id--+-DPLACes--integer--+--------------------------+ | +-NAME--str---------+ | | +-WIDth--integer----+ | | | .-OFF--. | | | '-ZEROs--+-ON---+---' | | (2) | +-EXCLude-------+---------+--+-column-id----------------+-----------+ | '-ALL BUT-' | .--------------. | | | | V | | | | '-(-----column-id---+---)--' | | (2) | +--+-GROUP---------+---+-+--------+--+-column-id----------------+-+-+ | | (2) | | '-EXCEPT-' | .--------------. | | | | +-SUBTotal------+ | | V | | | | | | (2) | | '-(-----column-id---+---)--' | | | '-TOTal---------' '-ERASE------------------------------------' | | | | | | (2) | +-INCLude-------+-----------------------------------------+---------+ | '-+------+--+-column-id----------------+--' | | '-ONLY-' | .--------------. | | | | V | | | | '-(-----column-id---+---)--' | +-NULL str----------------------------------------------------------+ | (2) | | .-ON-------. | | | (2) | | +-+-OFF------+------------------------------------------------------+ | (2) .-ON--. | +-OUTLINE-------+-OFF-+---------------------------------------------+ | .-2-------. | +-SEParator--+--+-integer-+---BLANKs--+-----------------------------+ | '-str--------------------' | | .-20------. | '-VARChar--+-integer-+----------------------------------------------' >---------------------------------------------------------------|
Notes:
Moves your display forward through a query result.
>>-FORWARD----+--------------+--------------------------------->< +-rows_integer-+ '-MAX----------'
Retrieves online documentation (available as an option during installation of the database manager).
>>-HELP----+------------+-------------------------------------->< +-CONTENTs---+ '-topic_name-'
Prevents an SQL statement from being processed when it is entered.
>>-HOLD--sql_statement-----------------------------------------><
Nullifies a partially entered, multiple line command.
>>-IGNORE------------------------------------------------------><
Inserts one or more rows of data into a table or view.
>>-INPut----+-table_name-+---+---------------------------+----->< '-view_name--' | .-,-----------------. | | V | | '-(-----column_name--)---+--'
The Interactive Select statement retrieves data from a table.
interactive-select-statement
>>-| fullselect |--+----------------------------------------------+-> | .-,-----------------------------. | | V .-ASC--. | | '-ORDER BY------+-column_name-+---+------+--+--' '-integer-----' '-DESC-' >----+---------------+----------------------------------------->< '-WITH--+-RR-+--' +-CS-+ '-UR-'
fullselect |--+-subselect----+---------------------------------------------> '-(fullselect)-' .------------------------------------------. V | >--------+------------------------------------+--+--------------| '--+-UNION-----+---+-subselect----+--' '-UNION ALL-' '-(fullselect)-'
subselect .-ALL------. |--SELECT----+----------+---+-*----------------------------+----> '-DISTINCT-' | .-,-----------------------. | | V | | '----+-expression---------+--+-' +-table_name.*-------+ +-view_name.*--------+ '-correlation_name.*-' .-,-----------------------------------------. V | >----FROM------+-table_name-+---+------------------+---+--------> '-view_name--' '-correlation_name-' >-----+--------------------------+------------------------------> '-WHERE--search_condition--' >-----+-------------------------------+-------------------------> | .-,--------------. | | V | | '-GROUP BY-----column_name---+--' >-----+---------------------------+-----------------------------| '-HAVING--search_condition--'
Traces activities within ISQL.
>>-ISQLTrace----+-DUMP----+------------------------------------>< +-DISPLAY-+ '-integer-'
Starts the display integer columns to the left, counting from the leftmost column on the display.
.-1-------. >>-LEFT----+---------+----------------------------------------->< '-integer-'
Lists information about stored SQL statements, or lists the settings of certain operational characteristics set by the SET command.
.-.----------------------------. V | >>-LIST----+-SQL------+-stored-statement-name-+--+-+----------->< | '-*---------------------' | | .-.--------------------. | | V | | '-SET----+-*---------------+--+---------' +-AUTOCommit------+ +-CASE------------+ | (1) | +-CLAss-----------+ +-CONTInue--------+ | (1) | +-COPies----------+ +-COSTest---------+ +-DECimal---------+ +-ISOLation-------+ +-LANGuage--------+ +-NULL------------+ +-PAGEsize--------+ | (1) | +-PRINTRoute------+ +-RUNMode---------+ +-SEParator-------+ '-VARChar---------'
Notes:
Requests printed copies of a query result by sending it to the system printer.
.---------------------------------. V | >>-PRInt-------+---------------------------+--+---------------->< | (1) .-A---------. | +-CLAss-------+-character-+-+ | (1) .-1-------. | '-COPies-------+-integer-+--'
Notes:
Requests printed copies of a query result by sending it to the system printer, POWER remote printer, or CICS/VSE terminal.
.----------------------------. V | >>-PRInt-------+----------------------+--+--------------------->< | .-?---------. | +-CLAss--+-character-+-+ | .-1-------. | +-COPies--+-integer-+--+ +-TERMid--termid-------+ +-DESTid--wkstat-------+ +-SYStem---------------+ '-TOUSER--+--------+---' '-userid-'
Retrieves a stored SQL statement.
>>-RECALL----+-----------------------+------------------------->< +-stored_statement_name-+ '-PREVIOUS--------------'
Renames a stored SQL statement.
>>-RENAME--old_stored_statement_name---------------------------><
>>-new_stored_statement_name-----------------------------------><
Starts the display integer columns to the right, counting from the leftmost column of the display.
.-1-------. >>-RIGHT----+---------+---------------------------------------->< '-integer-'
Initiates the processing of a routine. Multiple parameters are separated by blanks. Enclose a parameter in single quotation marks if it contains a blank.
>>-RUN--routine_name----+--------------------------+----------->< | .--------------. | | V | | '-(-----parameter---+---)--'
Saves all changes since the last SAVE command or, if no SAVE command was issued, since the start of the INPUT command. SAVE is used while you are using the INPUT command with AUTOCOMMIT on only.
>>-SAVE--------------------------------------------------------><
Sets specified operational characteristics.
Processes the current SQL statement or a stored SQL statement.
>>-START---+-----------------------+----------------------------> '-stored_statement_name-' >-----+-------------------------------+------------------------>< | .-------------------. | | V (1) | | '-(-----parameter--------+---)--'
Notes:
Saves the current SQL statement for later use. The statement remains stored until erased.
>>-STORE--stored_statement_name---+---------+------------------>< '-REPLACE-'
Notes:
Displays all characters of a column that are too wide to fit on the display.
.-1-------. >>-TAB----+---------+------------------------------------------>< '-integer-'
Notes:
The following default Program Function (PF) keys are provided through ISQL.
Note: | The CP SET command can be used to set the PF key functions. |
This CMS subset section applies to VM users. There is no equivalent section for VSE.
CMS or CP commands can be entered during an ISQL session. Supported commands from the CMS subset environment can be entered without terminating the ISQL session. To enter the CMS subset environment, type CMS on the command line, and press ENTER. Refer to Figure 1.
While in the CMS subset environment, you should not use any commands, programs, or execs that access the database manager. If they are used, the results are unpredictable and error conditions could occur.
To exit from the CMS environment, type RETURN in the command line, and press ENTER.
Figure 1. Using the CMS Subset Environment
View figure.