Pro*COBOL application reports RTS 114 error when using INITCALL"ORASQL11" in 64-bit



Customer has a Visual COBOL application that uses Oracle's Pro*COBOL product to access their Oracle database. When they compile the programs they use the directive INITCALL"ORASQL11". This will cause a CALL "ORASQL11" statement to be inserted into the beginning of the program in oder to load the Pro*COBOL run-time system orasql11.dll.

This works fine in 32-bit but when compiling for 64-bit and using the 64-bit version of Pro*COBOL the application is failing with a RTS 114 error when it is run.

What is the problem with 64-bit?


It appears that the 64-bit version of the Pro*COBOL run-time system does not contain an actual entry point called ORASQL11 whereas the 32-bit version does.

When a CALL statement is executed for an entry point that is not loaded the .dll with that name will be loaded automatically and then the entry point with the same name will be called. If there is no entry point with that name then the entry point with the lowest ordinal number within the .dll will be called and if that is expecting parameters it will result in the RTS 114 error.

To get around this, the Oracle run-time system can be loaded without calling its entry point by removing the INITCALL"ORASQL11" directive and adding the following code to the first program of the application:

01 proc-point  procedure-pointer.

     set proc-point to entry "ORASQL11"


Comment List