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
 
Difference between ++INCLUDE and COPY

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
kedar_lawande

New User


Joined: 06 Nov 2005
Posts: 2

PostPosted: Sun Oct 01, 2006 6:16 pm    Post subject: Difference between ++INCLUDE and COPY
Reply with quote

Hi all,

I want to know the difference between including copybooks using ++INCLUDE and COPY in Cobol.Does the compilation improve by using one of these.
If so,then how?


Thanks,
Kedar
Back to top
View user's profile Send private message

PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Sun Oct 01, 2006 9:17 pm    Post subject:
Reply with quote

++INCLUDE is a Panvalet command to include (!) data ( including copybooks ) into a source.

Attention : PANVALET can manage with names up to 10 characters.

Cheers
Pierre
Back to top
View user's profile Send private message
Sahoo

New User


Joined: 08 Jun 2006
Posts: 53

PostPosted: Mon Oct 02, 2006 12:15 pm    Post subject: Re: Difference between ++INCLUDE and COPY
Reply with quote

What is the difference between INCLUDE and COPY statement?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Oct 02, 2006 1:40 pm    Post subject:
Reply with quote

INCLUDE is opened by DB2 pre-processor; COPY is opened by COBOL compiler.

O.
Back to top
View user's profile Send private message
bonniem

New User


Joined: 09 Aug 2005
Posts: 67

PostPosted: Mon Oct 02, 2006 1:44 pm    Post subject:
Reply with quote

++INCLUDE in PANVALET is same as COPY. In other change management systems this needs to be replaced by COPY.
Back to top
View user's profile Send private message
kedar_lawande

New User


Joined: 06 Nov 2005
Posts: 2

PostPosted: Tue Oct 03, 2006 8:09 pm    Post subject:
Reply with quote

Thank you all for your answers.I would like to add that if u include a copybook with the panvalet command ++include then it gets expanded during the compile time unlike the copy command which expands the copybooks during run time.So if we include a copybook using the copy command,then it gives compilation errors for the copybook variables.Please correct me if I am wrong...


Regards,
Kedar
Back to top
View user's profile Send private message
satishstar
Currently Banned

New User


Joined: 14 Mar 2005
Posts: 15

PostPosted: Tue Oct 03, 2006 8:58 pm    Post subject: Re: Difference between ++INCLUDE and COPY
Reply with quote

If u r using a cobol+db2+cics program the complilation will be done intially on db2 pre complier and cics translator and then cobol compilation takes place , but as we need to use SQLCA copybook for db2 which is a copy book and if we give COPY SQLCA as COPY command is a cobol command which gets expanded during cobol compilation only but as we r using the SQLCA variables in the program which cannot get expanded until precompilation and cics translation and cannot find its varaibles and gives complilation error, so we use INCLUDE command of db2 which expands the copybook during db2 pre compilation only as INCLUDE is a db2 command.
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ISMF Difference between volume count ... upendrasri IBM Tools 2 Tue Dec 05, 2017 12:40 pm
No new posts Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm

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