Because the compiler works in conjunction with the DB2 coprocessor, you must start DB2 before you compile your program.
You can connect to the target database for the compilation before you start the compilation, or can have the compiler make the connection. To have the compiler connect, specify the database by either of these means: