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
 

 

What does a COPYBOOK exactly do and how it is used

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

New User


Joined: 14 Jun 2005
Posts: 2

PostPosted: Tue Jun 14, 2005 12:29 pm    Post subject: What does a COPYBOOK exactly do and how it is used
Reply with quote

Hi Friends,

Can anyone tell me what does a copy book exactly does and how is it used?
Back to top
View user's profile Send private message

Sangita

New User


Joined: 02 Jun 2005
Posts: 17

PostPosted: Tue Jun 14, 2005 12:52 pm    Post subject: Re: Copybooks
Reply with quote

Hi devonline,

In most of the big applications , there are large no. of programs
and maximum of them use a particular record structures and routines such as date validation routines are generally used by several programs.In such cases its important to ensure that each program has the same file description, record structure or code. And maintaining several copies of the same thing leads to errors and also time consuming.
Each time you modify one copy , you also modify all tha other copies. So to avoid all these we use COPYBOOK. The COPY statement inserts the copybook from the copylibrary into the source program during compilation.

e.g. COPY copybook-name OF/IN copy library-name

REPLACING identifier-1 BY identifire-2


1. COPY STUDREC.
2. COPY STUDREC REPLACING ALL "XX" BY "YY".

Regards,
Sangita
Back to top
View user's profile Send private message
sudheer648

New User


Joined: 23 May 2005
Posts: 97
Location: Chennai

PostPosted: Thu Jun 16, 2005 3:16 pm    Post subject: Re: What does a COPYBOOK exactly do and how it is used
Reply with quote

Hi devonline,

Copy Book Usage is to reduce the Redundancy of the similar declaritons/structure/etc.,

As Sangita use the Copy <copybookname> to include that copybook into your program while compilation.
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 Copybook structure in Load module Vai123 COBOL Programming 7 Fri Sep 16, 2016 8:29 pm
No new posts Geneartion of COBOL copybook structre... murugan_mf COBOL Programming 3 Fri May 20, 2016 12:48 pm
No new posts View Copybook having COPY statement i... nkumar Compuware & Other Tools 6 Mon May 16, 2016 7:28 pm
No new posts JCL Utility in accordance to the copy... meetsupriyo JCL & VSAM 3 Tue Dec 08, 2015 8:46 pm
No new posts Convert a COBOL copybook spoorni All Other Mainframe Topics 0 Fri Aug 28, 2015 7:53 pm


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