IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

What is Copybook and Copylib


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mayos

New User


Joined: 11 Apr 2005
Posts: 16

PostPosted: Thu Apr 14, 2005 3:46 pm
Reply with quote

Hello,

Just want to know what a copybook is and what is a copylib and when it is used in the jcl.

Many thanks.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Apr 14, 2005 4:16 pm
Reply with quote

They aren't. Those are terms relating to COBOL programs.
Back to top
View user's profile Send private message
andycool

New User


Joined: 12 Apr 2005
Posts: 64

PostPosted: Mon Apr 18, 2005 10:22 am
Reply with quote

Hi Mayos,

1. A COPYBOOK can contain some portion of your COBOL program.
For instance you have two programs: prog1 and prog2.
Both of these use a same set of working storage variables. Here, instead of using them twice in both programs, you can make a COPYBOOK ie another pgm/dataset letz say "progcpy", wch will only contain these working storage variables and nothing else.
This is called a working storage cpybook. You can incluse this "progcpy" in both of your pgms by using the statement:

====prgcpy====
05 working_variable1
05 working_variable2
05 working_variable3
============
prog1
UNEXPANDED: - progcpy

prog2
UNEXPANDED: - progcpy

2. A COPYLIB is the one where, after compiling your programs, the copy of it is picked up by the CICS scrn.

...Regards
Back to top
View user's profile Send private message
Mayos

New User


Joined: 11 Apr 2005
Posts: 16

PostPosted: Mon Apr 18, 2005 4:37 pm
Reply with quote

Thank you so very much for your explanation. It is very helpful. I appreciate it. Many thanks.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts Trying to change copybook in online c... CICS 4
No new posts Help to Filter File Manager Copybook ... DFSORT/ICETOOL 14
No new posts Need to add field to copybook, proble... COBOL Programming 14
No new posts Recompiling programs after a copybook... COBOL Programming 1
Search our Forums:

Back to Top