SQL.ACU defaults to Oracle with 4GL for MSSQL and ORACLE included in the runtime

0 Likes

Problem:

Is it possible to use the SQL.ACU COBOL program when accessing ORACLE and MS SQL environments during the same run execution?

Testing has shown that with both 4GL products included in the runtime SQL.ACU always defaults to the Oracle connection and will not access Microsoft SQL Server.

Resolution:

SQL.ACU calls the I$IO library routine using the EXECUTE opcode.  This opcode takes as its first parameter the file system to execute the SQL on.

The way that SQL.ACU gets that information is to look at a configuration variable SQL-TARGET, which should name the file system desired (as listed in filetbl.c)e.g:

ORACL

or

MSSQL

would need to be specified before the call to SQL.ACU.

Without that information, SQL.ACU will execute the SQL on the first non-vision file system (Oracle appears first in filetbl.c so would be the connection used).

Another option for you is to write the sql commands to a file from the COBOL program and then use a CALL SYSTEM to make use of MSSQL's command line query tool to  execute it.

Old KB# 2820
Comment List
Anonymous
Related Discussions
Recommended