OPTION (deprecated)

Enables non-default optional behavior.
Note: OPTION is deprecated, and supported for backward compatibility only. We recommend that you use equivalent SQL compiler directive options instead.

Syntax:

OPTION={SPCOMMITONRETURN | [NO]IGNORESCHEMAERRORS |
 NESTEDCLRDEBUG | PROCOB | [NO]SPDISPLAY | [DESCRIBEVARCHARPICX | 
DESCRIBEVARCHAR49] | [DESCRIBEDTREC | DESCRIBEDTCHAR] | OPTIMIZESPCURSORS}...

Parameters:

SPCOMMITONRETURN
Commits work done by a stored procedure when it returns to the calling application.
IGNORESCHEMAERRORS
When SQL(CHECK) is also specified, suppresses compile time errors resulting from missing schema objects. In this mode, you can use OpenESQL to check for SQL syntax errors without reference to the database schema. This can be helpful when planning an application migration, as you can use the COBOL compiler and OpenESQL to identify the statements that require remediation without having to first migrate the database schema. It also provides enhanced OpenESQL syntax checking during the development phase. Default is NOIGNORESCHEMAERRORS.
NESTEDCLRDEBUG
Enables debugging of nested stored procedure calls. Without this parameter, it is not possible to debug stored procedures that return result sets. This is due to limitations in the Microsoft SQL Common Language Runtime. NESTEDCLRDEBUG instructs the preprocessor to discard any result sets returned from nested stored procedure calls, thus making debugging possible.
PROCOB
Sets the DATE SQL compiler directive option to EXTERNAL for .NET applications only, that is, when DBMAN=ADO.
SPDISPLAY
Determines where COBOL DISPLAY information can be accessed. When set for a SQL CLR stored procedure, COBOL DISPLAYs are sent back to the caller as SQL Server information messages. When set for a COBOL application, SQL Server information messages are written to the console. When a COBOL stored procedure is called using an interactive SQL tool, such as SQL Server Management Studio, information messages are shown via the message output provided by the tool.

SPDISPLAY can be useful for tracing during debugging and for logging in deployed applications. If not set, then COBOL DISPLAY statements have no effect. Default is NOSPDISPLAY.

DESCRIBEVARCHARPICX
VARCHAR columns are suitable for PIC X host variables. Default.
DESCRIBEVARCHAR49
VARCHAR columns are suitable for VARCHAR host variables with level 49 sub-fields for length and data.
DESCRIBEDTREC
DATE, TIME, and DATETIME columns are suitable for the DATE, TIME, and TIMESTAMP-RECORD SQL TYPEs in ODBC format record structures. Default.
DESCRIBEDTCHAR
DATE, TIME, and DATETIME columns are suitable for PIC X(n) character host variables or DATE, TIME, and TIMESTAMP SQL TYPEs.
OPTIMIZESPCURSORS
For SQL CLR stored procedures, opens forward read-only cursors as firehose cursors, and when subsequent cursors are opened, reads the remainder of the result set into memory to optimize performance.

Properties:

Default: None

Dependencies:

BEHAVIOR=OPTIMIZED automatically sets DESCRIBEDTCHAR.

Scope:

Used at compile time: Yes
Behavior at run time: Source file

See Scope - OpenESQL SQL Compiler Directive Options for more information.

Comment:

Separate each instance of OPTION with a space.

Examples:

SQL(OPTION=DESCRIBEVARCHARPIX OPTION=NESTEDCLRDEBUG)
SQL(OPTION=DESCRIBEVARCHARPIX OPTION=IGNORESCHEMAERRORS OPTION=OPTIMIZESPCURSORS OPTION=PROCOB)