Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

[Solved]Difference between COPY and INC

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Difference between COPY and INC
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

Moderator Team Head


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

PostPosted: Tue Jul 05, 2005 5:32 pm    Post subject: Re: Difference between COPY and INC
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    Post subject: Difference between COPY and INC
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    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Difference between TWALENG and TWASIZE Arunkumar Chandrasekaran CICS 3 Tue Jan 03, 2017 12:57 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us