This article describes how to have one program which accesses both Datacom/SQL and IBM DB2.
Release: All supported releases.
You need to follow these considerations:
Compile and link the IBM DB2 program following the instructions in the IBM DB2 documentation. No reference to Datacom is required, for example, no URT is required.
Compile and link the Datacom SQL program following the instructions in the Datacom documentation. Remember to code the URT with DBUREND DBSQL=YES.
DATACOM SQL and IBM DB2 SQL calls are not possible from the same program. Mixed-mode processing, that is to say, ALL SQL statements in a program must be processed either by native IBM DB2 or by DATACOM/DB. Both DBMSs require the source program to embed the SQL statements in the same special statements (EXEC-SQL and END-SQL "bookends") and both DBMSs require the source to be manipulated by their own pre-compiler. Therefore, if the source was processed through one pre-compiler first, by the time it was passed to the other DBMS's pre-compiler, there would be no special statements left to process.