Certain portions of the Net.Data initialization, configuration, and macro files must be consistent for all components of Net.Data to work as a whole. The following table summarizes the areas of each of these files that must match.
Table 2. Consistency Requirements for the Net.Data Configuration Files and the Macro
File | Common Sections | Notes |
---|---|---|
Net.Data INI File | Environment Statement | The language environments that use Live Connection must specify the database cliette name in their environment statement |
Live Connection configuration variables | When using Net.Data Live Connection, specify the Live Connection port, DTW_CM_PORT. This variable value must match the MAIN_PORT value in the Live Connection configuration file. | |
Cache configuration variables | When using Net.Data caching, optionally include port number and machine name variables. These values must match those used in the Cache Manager configuration file, if used. | |
Live Connection Configuration File | Cliette Definitions | Each cliette definition must match a corresponding definition in the INI file. Additionally, the MAIN_PORT value must match the DTW_CM_PORT variable value in the INI file. |
Cache Manager Configuration File | Cache Manager Configuration Variables | When using Net.Data caching, you can optionally include port number and machine name variables. These values must match those used in the INI file, if used. |
The following fragments illustrate the relationship between a macro, a Net.Data initialization file, and a Live Connection configuration file. Two cliettes are used by the macro (DTW_SQL:SAMPLE, DTW_SQL:CELDIAL ) and access two DB2 databases, called SAMPLE and CELDIAL. The Live Connection configuration file contains the cliette names and definitions. The ENVIRONMENT statement in the Net.Data initialization file refers to the cliette name. The LOGIN and PASSWORD values are specified in the Live Connection configuration file.
Figure 2 shows a fragment of the macro that contains the @DTW_ASSIGN statement that defines which cliette is to be used to access a database.
Figure 2. Net.Data Macro Fragment
|
Note that the DATABASE configuration variable is substituted into the ENVIRONMENT statement of the initialization file to generate the cliette name. This allows you to access multiple databases from the same macro.
Figure 3 shows a fragment of the Net.Data initialization file that contains the ENVIRONMENT statement and the associated cliette type. There is one ENVIRONMENT statement for each cliette type in the initialization file. For each database cliette type, the ENVIRONMENT statement specifies a cliette name. The name is made up of the cliette type and a variable reference, $(DATABASE), which is resolved at run time. Each language environment that uses Live Connection must have a cliette definition in the ENVIRONMENT statement.
Figure 3. Net.Data Initialization File Fragment
|
Figure 4 shows a fragment of the Live Connection configuration file, which contains the cliette definitions for DTW_SQL:CELDIAL and DTW_JAVAPPS.
Figure 4. Live Connection configuration file fragment
|