Enables non-default optional behavior.
Attention: Starting with Enterprise Developer 2.2 Update 1, OPTION is supported for backward compatibility, but is deprecated. Use equivalent SQL
or HCOSS SQL compiler directive options instead.
Syntax:
OPTION={CHECKCALLPARAMS | SQLCLRTRANS |
[NO]IGNORESCHEMAERRORS | [NO]SPDISPLAY |
[DESCRIBEVARCHARPICX | DESCRIBEVARCHAR49] | [DESCRIBEDTREC | DESCRIBEDTCHAR] |
OPTIMIZESPCURSORS}...
Parameters:
- CHECKCALLPARAMS
- HCOSS only. Evaluates the parameters on a stored procedure call to determine if they are input or output. Automatically set by DIALECT=MAINFRAME.
- SQLCLRTRANS
- HCOSS only. Emulates mainframe behavior by substituting SQL Server savepoint operations for COMMIT and ROLLBACK when building both client applications and stored procedures. Uncommited work is rolled back when a stored procedure returns to the calling application unless the stored procedure was built with SPCOMMITONRETURN. Database locks are not released until the calling application performs a COMMIT or a ROLLBACK.
Note: If the client application is written in a language other than COBOL or PL/I, then it should also execute the SQL Server statement
save transaction MF__SAVEPOINT at the start of every transaction (i.e., after every COMMIT or ROLLBACK statement) and when turning AUTOCOMMIT mode off.
- IGNORESCHEMAERRORS
- HCOSS only. 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.
- 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.
For HCOSS only, automatically set by DIALECT=MAINFRAME.
- 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.
For HCOSS only, automatically set by DIALECT=MAINFRAME.
Dependencies:
For HCOSS only, BEHAVIOR=OPTIMIZED automatically sets DESCRIBEDTCHAR.
DIALECT=MAINFRAME automatically sets CHECKCALLPARAMS, DESCRIBEVARCHAR49, and DESCRIBEDTCHAR.
Scope:
Used at compile time:
|
Yes
|
Behavior at run time:
|
Source file
|
See
Scope - OpenESQL SQL Compiler Directive Options and
Scope - HCOSS SQL Compiler Directive Options for more information.
Comment:
Separate each instance of OPTION with a space.
Examples:
SQL(OPTION=DESCRIBEVARCHARPIX)
SQL(OPTION=DESCRIBEVARCHARPIX OPTION=IGNORESCHEMAERRORS)