Use the following steps to configure the SQL language environment.
If you chose to not create a Net.Data initialization file, the SQL language environment is enabled by default. There is no additional configuration necessary.
ENVIRONMENT(DTW_SQL) /QSYS.LIB/QTCP.LIB/QTMHSQL.SRVPGM ( ) (IN DATABASE, LOGIN, PASSWORD, TRANSACTION_SCOPE, SHOWSQL, DTW_SET_TOTAL_ROWS, DB_CASE, START_ROW_NUM, RPT_MAX_ROWS, OUT DTWTABLE, SQL_CODE, TOTAL_ROWS)
You do not need to specify all the variables specified above in the environment statement. If you do not use a variable, such as DTW_SET_TOTAL_ROWS and TOTAL_ROWS, you can remove it from the environment statement. An alternative way of passing these variables to the SQL language environment is by passing the variables on the Net.Data function call in your macro. For information on the language environment variables, see the Net.Data Reference.
Table 1. SQL Language Environment Configuration Variables
| Configuration Variable | Description |
|---|---|
| DTW_SQL_ISOLATION | Determines the degree to which the database operations executed by the
SQL language environment are isolated from concurrently executing
processes. Possible values are:
The default is DTW_SQL_READ_UNCOMMITTED. |
| DTW_SQL_NAMING_MODE | Determines how a table name can be specified in an SQL statement.
Possible values are:
Default is SQL_NAMING. |
For more information on the Net.Data initialization file, including environment configuration statements and configuration variable statements, see Configuring Net.Data.