2. Set the OptMsg global variable within an ESQL/C application to control which SQL statements use message chaining.
The default value of the OPTOMSG environment variable is 0 (zero). Setting OPTMSG to 0 (zero) explicitly disables message chaining. You might want to disable optimized message transfers for statements that require immediate replies, or for debugging purposes. To enable optimized message transfers, you must set OPTMSG before you start the ESQL/C application. On UNIX operating systems, you can set OPTMSG within the application with the putenv() system call (as long as your system supports the putenv() function). The following call to putenv(), for example, enables optimized message transfers:
0
1
With the OPTMSG environment variable set to 1, you must still set the OptMsg global variable to 1 to enable the message chaining. If you omit the following statement from your program, ESQL/C does not perform message chaining:
2