IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

[Solved]Difference between COPY and INC


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mandyzzzz

New User


Joined: 04 Jul 2005
Posts: 23

PostPosted: Tue Jul 05, 2005 12:52 pm
Reply with quote

Hi all
What is the technical difference between COPY and INC ?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Jul 05, 2005 5:32 pm
Reply with quote

The COPY verb is used to copy valid COBOL language constructs at the point of COPY. Since this is a compilation stage activity the actual copying is done by the cobol compiler.

An SQL INCLUDE on the other hand is used to copy DCLGEN members into the host language. This is done by the SQL precompiler from your DCLGEN library.
Back to top
View user's profile Send private message
tetrion

New User


Joined: 22 May 2005
Posts: 8

PostPosted: Tue Jul 05, 2005 5:36 pm
Reply with quote

Hi,
The main difference between COPY and INC is that
The member that is included becomes available to the precompilation phase which enables the varibles in the included members to be used in SQL statements.

bye
Back to top
View user's profile Send private message
mandyzzzz

New User


Joined: 04 Jul 2005
Posts: 23

PostPosted: Tue Jul 05, 2005 6:30 pm
Reply with quote

Hi
Thanks for help.
But in a ordinary cobol program..where there is no DB2 access ...then what is the difference between copy and inc?
I have seen normal cobol copybooks to be added both via copy and inc.
Kindly elaborate.


Thanks again!
Back to top
View user's profile Send private message
mandyzzzz

New User


Joined: 04 Jul 2005
Posts: 23

PostPosted: Tue Jul 05, 2005 6:36 pm
Reply with quote

I just checked a previous topic with same subject.
The difference seems to be when there is need for precompilation....so can it be concluded that for an ordinary cobol program without DB2 copy and inc means exactly the same thing???????????
Back to top
View user's profile Send private message
anuradha

Active User


Joined: 06 Jan 2004
Posts: 247
Location: Hyderabad

PostPosted: Tue Jul 05, 2005 7:24 pm
Reply with quote

Yes, Mandyzz.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts DB2 Table - Image copy unload IBM Tools 2
No new posts Timestamp difference and its average ... DB2 11
Search our Forums:

Back to Top