Cobol-Copy and Include – Difference

I found a nice thing that the difference between COPY and INCLUDE. Both are the same.

See the description how and when-

COPY- cobol reserved word. So if we want to embed cobol code, written in another pds, we can embed it by “COPY name-1”

INCLUDE- It is not at all related to COBOL. It is purely SQL statement. It includes SQLCA in the form of Cobol code. So the function of both the statements are the same.

But we must give “SQL” compiler option(we need to give when DB2 code is there in the program) when we use DB2 in the Cobol program.

Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.