Problem:
Microsoft SQL Server locking with the same code that works with DB2 on PC
Resolution:
SQL compiler directives used were SQL(TARGETDB=MSSQLSERVER BEHAVIOR=MAINFRAME ISOLATION=CR)
By default, when SQL(BEHAVIOR=MAINFRAME) is specified, all read-only cursors will be independent firehose cursors -- i.e. SQL(RO_CURSOR=IC_FH) -- which means that all cursors of this type will run in a separate connection, subject to various locking scenarios.
Specifying SQL(BEHAVIOR=MAINFRAME RO_CURSOR=FF) changed the cursor type to fast-forward server-side cursors, which provides the appropriate locking model.
#EnterpriseDeveloper
#Enterprise
#MainframeExpressandMFE
#MFDS
#netexpress
#COBOL