The Datacom COBOL preprocessor DBXMMPR is not expanding copy books. Using COPY REPLACING COBOL syntax.
Program code defining host variables:
EXEC SQL BEGIN DECLARE SECTION END-EXEC
COPY CREC REPLACING
==01 C-ORG== BY == 05 C-ORG PIC X(06)==.
EXEC SQL END DECLARE SECTION END-EXEC
DB21023E ---- UNKNOWN HOST VARIABLE: 'C-ORG'
Release : 15.1
Component : DATACOM SQL
DBXMMPR will not expand COBOL COPY statements so it can't be used to define SQL host variables.
The SQL INCLUDE directive can be used in place of COPY to copy statements from the INCLUDE library. However it does not support the REPLACE option so the copybook has to be coded with the correct fields.
Replace the COPY with this code:
Then add an INCLUDE DD statement to the DBXMMPR JCL pointing to the library that contains the copy book:
//INCLUDE DD DSN=hlq.include.library,DISP=SHR