OPTOFC environment variable

Use the OPTOFC environment variable to enable optimize-OPEN-FETCH-CLOSE functionality in applications or other APIs (such as JDBC, ODBC, OLE DB, LIBDMI, and Lib C++) that use DECLARE and OPEN statements to establish a cursor.

1  setenv OPTOFC
2.1! 0
2.1 1
disables OPTOFC for all threads of the application.
enables OPTOFC for every cursor in every thread of the application.

The default value is 0 (zero).

You can set the OPTOFC environment variable on the client or server. If this environment variable is set on the server, then any application that does not explicitly set this environment variable uses the value that is set on the server.

The OPTOFC environment variable reduces the number of message requests between the application and the database server.

If you set OPTOFC from the shell, you must set it before you start the application. For more information about enabling OPTOFC and related features, see the HCL OneDB™ ESQL/C Programmer's Manual.