How to handle a program source which accesses CA Datacom/SQL and IBM DB2?
You need to follow these considerations:
- You cannot invoke CA Datacom SQL and IBM DB2 SQL statements from the same program.
- You can split the program into 3 parts:
· one main-program with no SQL calls,
· one subprogram with CA Datacom SQL calls, and
· one subprogram with IBM DB2 calls.
- One main program with CA Datacom SQL calls and one subprogram with IBM DB2.
Compile and link the IBM DB2 program following the instructions in the IBM DB2 documentation. No reference to CA Datacom is required, for example, no URT is required.
Compile and link the CA Datacom SQL program following the instructions in the CA Datacom documentation. Remember to code the URT with DBUREND DBSQL=YES
* CA 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 CA-DATACOM/DB. Both DBMS require the source program to embed the SQL statements in the same special statements (EXEC-SQL and END-SQL “bookends”) and both DBMS 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 pre-compile there would be no special statements left to process.