Page 1 of 1

Difference between INCLUE and COPY in the program

PostPosted: Tue Oct 27, 2009 11:20 pm
by chetan_007
Hi,

Both the entities, INCLUDE and COPY are used to expand the copy book.

eg:- Inside cobol program

-INC (copy book name)

or COPY (copy book name)

So what 's the difference between COPY and INCLUDE inside the program.

Plz let me know.

Tks in Adv.

Re: Difference between INCLUE and COPY in the program

PostPosted: Wed Oct 28, 2009 12:23 am
by dick scherrer
Hello,

Both the entities, INCLUDE and COPY are used to expand the copy book.
Not quite. . .

Suggest you run a compile with a COPY for some copybook and INCLUDE for that same copybook.

INCLUDE is used by a pre-processor rather than the actual compile.

Re: Difference between INCLUE and COPY in the program

PostPosted: Fri Oct 30, 2009 2:26 pm
by KMG
INCLUDE will read copybook dynamically where COPY makes STATIC call.

Explanation:
In case of INC, if you modify your copybook then there is no need to re-compile your program .

Re: Difference between INCLUE and COPY in the program

PostPosted: Fri Oct 30, 2009 11:36 pm
by dick scherrer
Hello,

Possibly the most incorrect reply posted anywhere in our forum. . . :(

Why do you believe either include or copy has anything to do with "static"?

Why do you believe that a copybook can be changed and not require a re-compile?

Possibly, i completely misunderstand something. . .

Re: Difference between INCLUE and COPY in the program

PostPosted: Tue Nov 03, 2009 8:29 pm
by Anuj Dhawan
COPY is opened by COBOL compiler.
++INCLUDE is a Panvalet command to include data into a source library.
INCLUDE is opened by DB2 pre-processor.