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
 

 

Copy & include statements in Procedure division

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
maheshurstd

New User


Joined: 16 Feb 2006
Posts: 14

PostPosted: Mon Jun 26, 2006 11:36 am    Post subject: Copy & include statements in Procedure division
Reply with quote

Hi,

what are the contents present in the following code

PROCEDURE DIVISION.
PARA1.

COPY MEMBER NAME
INCLUDE MEMBER NAME

Thanks in advance

Regards

Mahesh
Back to top
View user's profile Send private message

param_rajesh_2001
Warnings : 1

New User


Joined: 23 Jun 2006
Posts: 18
Location: Bangalore

PostPosted: Mon Jun 26, 2006 12:44 pm    Post subject:
Reply with quote

Both the stmt does the same , The first STMT "COPY MEMBER NAME " ..
Cobol Copy books get copied in the comile time here member "NAME" COPIED during the compile time

the second "INCLUDE MEMBER NAME " MEMBER NAME copied during the pre-compile time .
Back to top
View user's profile Send private message
creator.abhishek

New User


Joined: 07 May 2006
Posts: 32
Location: Pune

PostPosted: Mon Jun 26, 2006 12:58 pm    Post subject:
Reply with quote

Both does the same thing, onlt the difference is include is precompilation stmt and copy is complitaion stmt. both r stmt of working-storage division, it doesn't work in procedure division .
Back to top
View user's profile Send private message
k.pavankumar

New User


Joined: 22 May 2006
Posts: 8

PostPosted: Mon Jun 26, 2006 1:22 pm    Post subject: Re: Copy & include statements in Procedure division
Reply with quote

Hi Mahesh.

The COPY is the Cobol statement and the INCLUDE belongs to the Precompilation expanision.

In your description there is a fault, while writing the include statement you have to place it in EXEC SQL and END-EXEC Block.

EXEC SQL
INCLUDE <copybook>
END EXEC.

According to your declaration you will definitely face a compilation error.
Back to top
View user's profile Send private message
parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Mon Jun 26, 2006 3:25 pm    Post subject:
Reply with quote

Hi,

Just a little correction,
I think, both copy and include statements works fine even in procedure divisions.

Thanks,
Parikshit
Back to top
View user's profile Send private message
creator.abhishek

New User


Joined: 07 May 2006
Posts: 32
Location: Pune

PostPosted: Mon Jun 26, 2006 4:24 pm    Post subject:
Reply with quote

Hi Parikshit, i think procedure division is for processing , which can be run in compilation time, how u say precompilation stmt is able to come there. plz let me know.
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 Calling procedure with multiple entri... steve-myers PL/I & Assembler 5 Fri Jan 27, 2017 3:33 pm
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 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