IBM GC09-2830-00 Server User Manual


 
If the DB2 command contains characters that have special meaning
on the operating system you are using, you will need to enter the
command in quotation marks to ensure that it is run properly.
For example, the following command would retrieve all the
information from the employee table, even if the * character has a
special meaning on the operating system:
db2 "select * from employee"
If you need to enter a long command that does not fit on one line, use the line
continuation character, \. When you have reached the end of the line, press
the Enter key to continue entering the command on the next line. For
example:
db2 select empno, function, firstname, lastname, birthdate, from \
db2 (cont.) => employee where function='service' and \
db2 (cont.) => firstname='Lily' order by empno desc
Interactive Input Mode
To invoke the command line processor in interactive input mode, do the
following:
OS/2 Click on OS/2 Warp, and select DB2 for OS/2–>Command
Line Processor or enter the db2 command.
Windows 9x or Windows NT
Click on Start, and select Programs->DB2 for
Windows->Command Line Processor.
You can also invoke the command line processor in interactive input
mode by entering the db2cmd command followed by the db2
command at an MS-DOS prompt.
In interactive input mode, the prompt looks like this:
db2 =>
In interactive input mode, you do not have to enter DB2 commands with a
db2 prefix; instead, you just enter the DB2 command. For example:
db2 => list database directory
To enter operating system commands in interactive mode, precede the
operating-system command with an exclamation mark (!). For example:
db2 => !dir
If you need to enter a long command that does not fit on one line, use the line
continuation character, \. When you have reached the end of the line, press
the Enter key to continue entering the command on the next line. For
example:
Appendix A. Basic Task Knowledge 137