Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts XMITIP sends it out. Can it copy on l... Rommel Dayon Rustia IBM Tools 0 Tue Sep 05, 2017 10:16 am
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 7 Thu Apr 27, 2017 1:15 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us