What is the difference between Copy and Include?
Moderators: dbzTHEdinosauer, Moderator Group
What is the difference between Copy and Include?
Hi all,
What is the difference between Copy and Include?
Thanks in Advance.
Regards,
Siva
What is the difference between Copy and Include?
Thanks in Advance.
Regards,
Siva
Look like .. it is a interview question.
ok. here is the answer. function of COPY & INCLUDE is the same.
But the difference is .. cobol compiler can able to understand COPY statement.
INCLUDE statement normally uses in DB2 programs to include DCLGEN copy books. At that time, pre-compiler (we use this in db2 programs compilation process ) will process these include statements.
ok. here is the answer. function of COPY & INCLUDE is the same.
But the difference is .. cobol compiler can able to understand COPY statement.
INCLUDE statement normally uses in DB2 programs to include DCLGEN copy books. At that time, pre-compiler (we use this in db2 programs compilation process ) will process these include statements.
Natarajan
Chennai
Chennai
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
COPY is a compiler directive
INCLUDE is a DB2 pre-compiler directive.
if you want the copybook 'expanded during pre-compilation' use INCLUDE.
if you want the copybook 'expanded during compilation' use COPY.
INCLUDE is a DB2 pre-compiler directive.
if you want the copybook 'expanded during pre-compilation' use INCLUDE.
if you want the copybook 'expanded during compilation' use COPY.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
-
- Member
- Posts: 1
- Joined: Fri May 09, 2008 4:22 pm
COPY vs INCLUDE in non-DB2 program
Hi all,
From the above answers,
does it mean that for a non-DB2 Cobol program,
both COPY and INCLUDE are same
both functionally as well as during compiling
(since there is no pre-compile, INCLUDEd copybooks will also be expanded during compile) ?
From the above answers,
does it mean that for a non-DB2 Cobol program,
both COPY and INCLUDE are same
both functionally as well as during compiling
(since there is no pre-compile, INCLUDEd copybooks will also be expanded during compile) ?
Thanks and regards,
Dipak Goyal
Dipak Goyal
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
Ah, No . . .both COPY and INCLUDE are same
both functionally as well as during compiling
You have misunderstood what has been explained.
The COBOL compiler does not support INCLUDE. Things INCLUDEd must be in the source before it is seen by the compiler. There is other software that can deal with INCLUDE but you do not need to be concerned with this just now (and maybe never ) .
Suggest you re-read what DBZ has posted (and WC mentioned).
Have a good one
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page