When using a current version of
Visual COBOL with an SQL application that has been:
- Developed in an earlier
Micro Focus COBOL development product or a version of
Visual COBOL earlier than 2.1
- Migrated to a version of
Visual COBOL later than 2.1
Consider setting BEHAVIOR=UNOPTIMIZED as a temporary solution that enables you to compile and run these applications on the newer versions of
Visual COBOL.
BEHAVIOR=UNOPTIMIZED sets OpenESQL to the default behavior that existed in older versions of our software, and therefore handles ambiguously declared embedded SQL cursors using the behavior that was the default when the application was developed. Apply this temporary solution to applications that contain the following:
- EXEC SQL SET CONCURRENCY
- EXEC SQL SET SCROLLOPTION
- EXEC SQL SET CURSORTYPE
- A FETCH that occurs on a cursor after an EXEC SQL COMMIT statement is executed
However, because this temporary solution does not provide optimized performance, we recommend that you eventually update your older SQL applications to take advantage of the current
Visual COBOL optimization features. To do this:
- Remove EXEC SQL SET CONCURRENCY, SET SCROLLOPTION, and SET CURSORTYPE statements. These are replaced by setting appropriate BEHAVIOR primitive directives.
- We offer two approaches to updating applications that contain a FETCH that occurs on a cursor after an EXEC SQL COMMIT statement is executed. Do one of the following:
- Modify the code by adding a WITH HOLD clause to the DECLARE CURSOR statement
- Leave the code intact, and specify appropriate BEHAVIOR primitive directives