COBOL requirements for Datacom/SQL and DB2?

book

Article ID: 38063

calendar_today

Updated On:

Products

CA Datacom - DB CA Datacom CA Datacom - AD CA Datacom - Server CA CIS CA Common Services for z/OS CA 90s Services CA Database Management Solutions for DB2 for z/OS CA Common Product Services Component CA Common Services CA Datacom/AD CA ecoMeter Server Component FOC CA Easytrieve Report Generator for Common Services CA Infocai Maintenance CA IPC Unicenter CA-JCLCheck Common Component CA Mainframe VM Product Manager CA Chorus Software Manager CA On Demand Portal CA Service Desk Manager - Unified Self Service CA PAM Client for Linux for zSeries CA Mainframe Connector for Linux on System z CA Graphical Management Interface CA Web Administrator for Top Secret CA CA- Xpertware

Issue/Introduction

Question:

How to handle a program source which accesses CA Datacom/SQL and IBM DB2?

 

Answer:

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.

OR

- 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. 

 

 

Environment

Release:
Component: DB