Enables non-default optional behavior.
Note: OPTION is deprecated, and supported for backward compatibility only. We recommend that you use equivalent HCOSS SQL compiler
directive options instead.
Syntax:
OPTION={NORSLOCATORS | CHECKCALLPARAMS | SQLCLRTRANS}...
Parameters:
- NORSLOCATORS
- Enables non-COBOL client applications to read result sets from COBOL stored procedures that have been migrated from the mainframe.
SQL Server COBOL stored procedures return result sets as simulated mainframe result sets. NORSLOCATORS applies only when both DIALECT=MAINFRAME and DBMAN=ADO are also set.
- CHECKCALLPARAMS
- Evaluates the parameters on a stored procedure call to determine if they are input or output. Automatically set by DIALECT=MAINFRAME.
- SQLCLRTRANS
- 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.
Dependencies:
DIALECT=MAINFRAME automatically sets CHECKCALLPARAMS.
Scope:
Used at compile time:
|
Yes
|
Behavior at run time:
|
Source file
|
See
Scope - HCOSS SQL Compiler Directive Options for more information.
Comment:
Separate each instance of OPTION with a space.
Example:
SQL(OPTION=CHECKCALLPARAMS OPTION=NORSLOCATORS)