Previous Topic: Token TablesNext Topic: Installation-Specific Tokens


Database-Specific Tokens

Most applications require a database. The following tokens support the DBMS that your application will use:

In most cases, the tokens OPT.DBUSER, OPT.DBPSWD, and OPT.DBCONNECT need to be set to connect to and log on to the running database instances. These tokens have no defaults, so it is advisable to set these values and store the profile for future use. In most cases, OPT.DBCONNECT is set using the generated DBNAME provided in the databases ICM file.

For Windows systems only

If OPT.DBCONNECT is set to LOCAL, no database name is used for connections. In this case, it is expected that the user's local environment is set up with a default location to connect to. The method of indicating a default location varies by DBMS.

For UNIX/Linux systems

Only OPT.DBUSER, OPT.DBPSWD, OPT.DBCONNECT, and OPT.DBPCCFLAGS are used. Since database library and binary paths are set by the system administrator, the remaining LOC and OPT tokens above are not used in the UNIX build scripts (UNIX users use the PATH and LIBPATH, SHLIB_PATH, or LD_LIBRARY_PATH environment variables instead. Linux users use the LD_LIBRARY_PATH instead).

The token OPT.DBPCCFLAGS (C) contains a default set of precompiler flags for each particular database. These flags can be modified, added to, or removed.

For Windows systems, the LOC tokens that represent the DBLIB, DBPATH, and DBINCLUDE must be set for each DBMS that is used. These tokens represent the locations of the database binaries, libraries, and include files. The OPT tokens that represent the DBLIB, DBSQLLIB and DBPCC are set to the database library, database SQL library, and database precompiler, if applicable.

For installing DDL using JDBC, the DBCONNECT string needs to be the data source name for the JDBC Driver (that is, for DB2 'jdbc:db2:mydb'; for Oracle 'jdbc:oracle:thin:@myhost:1521:mydb').

For Web Generation using DataSource Objects and EJBs, the DBCONNECT string needs to be the data source name for the defined resource adapter in the Application server (that is, for J2EE  'java:jdbc/MYDB').