What is a copybook and when should one be used?



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

What is a copybook and when should one be used?

Postby breentha_d » Mon Jun 09, 2008 7:22 pm

hi,

i would like to know what is a copybook and when to use it.


Thank you

Breentha
breentha_d
 
Posts: 29
Joined: Mon Dec 10, 2007 2:26 am
Has thanked: 0 time
Been thanked: 0 time

Re: What is a copybook and when should one be used?

 

Re: What is a copybook and when should one be used?

Postby dick scherrer » Mon Jun 09, 2008 9:56 pm

Hello Breentha,

When you have a new question, please start a new topic rather than replying to some existing topic.

COPYBOOKs are code that is kept in a common library (COPYlib) and is expanded in COBOL code using the COPY command.

COPY is used when the same code (i.e. a record layout) is to be used in multiple programs. Using a copybook allows the code to be maintained in one place, but used in all of the programs that need that same code. This can be any kind of code that is used multiple places, not only records layouts.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post